mirror of https://github.com/calzoneman/sync.git
Fix rtmp->rtmp transition
This commit is contained in:
parent
2bfb143c4c
commit
e88031f4c5
|
@ -7,6 +7,14 @@ window.RTMPPlayer = class RTMPPlayer extends VideoJSPlayer
|
|||
if not (this instanceof RTMPPlayer)
|
||||
return new RTMPPlayer(data)
|
||||
|
||||
@setupMeta(data)
|
||||
super(data)
|
||||
|
||||
load: (data) ->
|
||||
@setupMeta(data)
|
||||
super(data)
|
||||
|
||||
setupMeta: (data) ->
|
||||
data.meta.direct =
|
||||
# Quality is required for data.meta.direct processing but doesn't
|
||||
# matter here because it's dictated by the stream. Arbitrarily
|
||||
|
@ -16,5 +24,3 @@ window.RTMPPlayer = class RTMPPlayer extends VideoJSPlayer
|
|||
link: data.id
|
||||
}
|
||||
]
|
||||
|
||||
super(data)
|
||||
|
|
|
@ -1079,7 +1079,7 @@ Callbacks = {
|
|||
}
|
||||
}
|
||||
|
||||
var SOCKET_DEBUG = false;
|
||||
var SOCKET_DEBUG = localStorage.getItem('cytube_socket_debug') === 'true';
|
||||
setupCallbacks = function() {
|
||||
for(var key in Callbacks) {
|
||||
(function(key) {
|
||||
|
|
|
@ -1007,15 +1007,24 @@
|
|||
if (!(this instanceof RTMPPlayer)) {
|
||||
return new RTMPPlayer(data);
|
||||
}
|
||||
data.meta.direct = {
|
||||
this.setupMeta(data);
|
||||
RTMPPlayer.__super__.constructor.call(this, data);
|
||||
}
|
||||
|
||||
RTMPPlayer.prototype.load = function(data) {
|
||||
this.setupMeta(data);
|
||||
return RTMPPlayer.__super__.load.call(this, data);
|
||||
};
|
||||
|
||||
RTMPPlayer.prototype.setupMeta = function(data) {
|
||||
return data.meta.direct = {
|
||||
480: [
|
||||
{
|
||||
link: data.id
|
||||
}
|
||||
]
|
||||
};
|
||||
RTMPPlayer.__super__.constructor.call(this, data);
|
||||
}
|
||||
};
|
||||
|
||||
return RTMPPlayer;
|
||||
|
||||
|
|
Loading…
Reference in New Issue