mirror of
https://gitlab.com/Shinobi-Systems/ShinobiCE.git
synced 2025-03-09 15:40:15 +00:00
Blue Turtle - The Refactoring
This commit is contained in:
parent
04011678fb
commit
b7d08eb500
67 changed files with 11651 additions and 8452 deletions
|
@ -19,7 +19,8 @@ var Poseidon = function () {
|
|||
uid: options.uid,
|
||||
ke: options.ke,
|
||||
id: options.id,
|
||||
channel: options.channel
|
||||
channel: options.channel,
|
||||
errorCallback: options.onError
|
||||
};
|
||||
_classCallCheck(this, Poseidon);
|
||||
|
||||
|
@ -28,10 +29,11 @@ var Poseidon = function () {
|
|||
} else {
|
||||
this._callback = function (err, msg) {
|
||||
if (err) {
|
||||
console.error('Poseidon Error: ' + err);
|
||||
if(_monitor.errorCallback)_monitor.errorCallback(err)
|
||||
console.error('Poseidon Error: ' + err,options);
|
||||
return;
|
||||
}
|
||||
console.log('Poseidon Message: ' + msg);
|
||||
console.log('Poseidon Message: ' + msg,options);
|
||||
};
|
||||
}
|
||||
if (!options.video || !(options.video instanceof HTMLVideoElement)) {
|
||||
|
@ -467,7 +469,7 @@ var Poseidon = function () {
|
|||
}, {
|
||||
key: '_onSocketDisconnect',
|
||||
value: function _onSocketDisconnect(event) {
|
||||
this._callback(null, 'socket disconnect "' + event + '"');
|
||||
this._callback(true, 'socket disconnect "' + event + '"');
|
||||
this.stop();
|
||||
}
|
||||
}, {
|
||||
|
@ -502,6 +504,7 @@ var Poseidon = function () {
|
|||
}, {
|
||||
key: '_onSegment',
|
||||
value: function _onSegment(data) {
|
||||
if(!this._mediaSource)this_.socket.disconnect()
|
||||
if (this._sourceBuffer.buffered.length) {
|
||||
var lag = this._sourceBuffer.buffered.end(0) - this._video.currentTime;
|
||||
if (lag > 0.5) {
|
||||
|
@ -605,4 +608,4 @@ var Poseidon = function () {
|
|||
//first request codec string to test against browser and then feed first into source
|
||||
//then request init-segment to feed
|
||||
//then request media segments until we run into pause, stop, close, error, buffer not ready, etc
|
||||
//change poster on video element based on current status, error, not ready, etc
|
||||
//change poster on video element based on current status, error, not ready, etc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue