Fix rtmp->rtmp transition

This commit is contained in:
calzoneman 2016-03-02 19:18:33 -08:00
parent 2bfb143c4c
commit e88031f4c5
3 changed files with 21 additions and 6 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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;