Embed: mews: fixes seek loop *knock on wood*
This commit is contained in:
parent
4efeb06c1d
commit
ac54fef930
2 changed files with 27 additions and 28 deletions
File diff suppressed because one or more lines are too long
|
@ -102,6 +102,7 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
|
||||
var player = this;
|
||||
//player.debugging = true;
|
||||
//player.debugging = "dl"; //download appended data on ms close
|
||||
|
||||
//this function is called both when the websocket is ready and the media source is ready - both should be open to proceed
|
||||
function checkReady() {
|
||||
|
@ -129,8 +130,7 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
player.ms.onsourceended = function(e){
|
||||
if (player.debugging) console.error("ms ended",e);
|
||||
|
||||
//for debugging
|
||||
|
||||
if (player.debugging == "dl") {
|
||||
function downloadBlob (data, fileName, mimeType) {
|
||||
var blob, url;
|
||||
blob = new Blob([data], {
|
||||
|
@ -154,7 +154,6 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
a.remove();
|
||||
};
|
||||
|
||||
if (player.debugging) {
|
||||
var l = 0;
|
||||
for (var i = 0; i < player.sb.appended.length; i++) {
|
||||
l += player.sb.appended[i].length;
|
||||
|
@ -906,8 +905,8 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
value = (e.data.current*1e-3).toFixed(3);
|
||||
var f = function() {
|
||||
video.currentTime = value;
|
||||
if (video.currentTime != value) {
|
||||
if (player.debugging) console.log("Failed to set video.currentTime, wanted:",value,"got:",video.currentTime);
|
||||
if (video.currentTime.toFixed(3) != value) {
|
||||
MistVideo.log("Failed to seek, wanted:",value,"got:",video.currentTime.toFixed(3));
|
||||
player.sb._doNext(f);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue