Breaking News

Information

0 0

0 && dvpCCEnabled) { var englishCaptions = captionsSelector.discover(“enter[value=en]”); englishCaptions.click on(); } } // ie 11 compliant perform DispatchDomEvent(identify) { if (typeof identify !== ‘string’) return; var e; if (typeof(Occasion) === ‘perform’) { e = new Occasion(identify); } else { e = doc.createEvent(‘Occasion’); e.initEvent(identify, true, true); } doc.dispatchEvent(e); } // DEFINE MULTI-BANDWIDTH BUTTON CONTROL MediaElementPlayer.prototype.buildmultiBandwidth = perform (participant, controls, layers, media) { var multiBandwidth = $(““).appendTo(controls);
mbOptions = $(“#multiBandwidthOptions”);
createMultiBandwithAnchors(currentVideoHeight);
multiBandwidth.hover(perform () {
mbOptions.present();
},
perform () {
mbOptions.conceal();
});
};

// BUILD MULTI-BANDWIDTH PLAYER TOOL
perform createMultiBandwithAnchors(videoHeight) {
videoHeight = checkVideoHeight(videoHeight);
updateMultiBandwithAnchors(videoFilesObj, videoHeight);
}

// CHECK IF CURRENT VIDEO HEIGHT EXISTS
perform checkVideoHeight(heightToCheck) {
var index = videoFilesObj.size – 1;
tempHeight = videoFilesObj[index].top;
for (var i = 0; i 0) {
restartTimer = time;
}
}

// The container factor is comparatively positioned. MediaElement js creates a fully
// positioned factor inside. Completely positioned objects don’t respect the containment
// of mum or dad comparatively positioned parts. This ensures the heights are constrained.
perform calculateVideoHeight() {
if (debug) console.log(‘DVIDSPlayer() > calculateVideoHeight()’);
var playerHeight = $(‘.DVIDSVideoPlayerItem video’).top();
if (debug) console.log(‘DVIDSPlayer() > calculateVideoHeight’, playerHeight);
if (playerHeight) {
$(‘.DVIDSVideoPlayer .video-column, .DVIDSVideoPlayerItem, .DVIDSVideoPlayerItemPlaceHolder’).css(“min-height”, playerHeight + 20);
$(‘.DVIDSVideoPlayerItem .mejs__video, .DVIDSVideoPlayerItem video’).css(‘top’, playerHeight);
}
}

perform debounce(func, wait, fast) {
var timeout;
return perform () {
var context = this, args = arguments;
var later = perform () {
timeout = null;
if (!fast) func.apply(context, args);
};
var callNow = fast && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};

perform setAspectRatio() {
if (debug) console.log(‘DVIDSPlayer() > setAspectRatio()’);
// for portrait facet ratio, want to attend until video is enjoying, then redetect top
var loopCount = 0;
var mainLoopId = setInterval(perform () {
loopCount++;
calculateVideoHeight();
if (loopCount > 10) {
clearInterval(mainLoopId);
}
if (debug) console.log(‘DVIDSPlayer() > setAspectRatio() > setInterval Working’);
}, 500);
}

perform playVideo() {
doc.getElementById(‘videoPlayer677’).play();
setAspectRatio();
//var playButton = $(“.mejs-overlay-play”);
//if (playButton.measurement() != 0) {
// playButton.set off(“click on”);
//}
}

myPlayer = new MediaElementPlayer(‘videoPlayer677’, {
videoWidth: ‘100%’,
videoHeight: ‘100%’,
//enableAutosize: true,
pluginPath: “/DesktopModules/SharedLibrary/Plugins/MediaElement4.2.9/”,
options: [“playpause”, “progress”, “current”, “duration”, “tracks”, “multiBandwidth”, “volume”, “fullscreen”],
success: perform (mediaElement, domObject) {

mediaElement.addEventListener(‘enjoying’, perform (e) {
if (defaultButton.size) {
if (playEventButtonTriggered === false) {
defaultButton.conceal();
hoverButton.conceal();
playEventButtonTriggered = true;
}
}

if (playEventAlreadyTriggered === false) {
DVIDSVideoAnalytics.monitor(‘play’, analyticsParams);
if(debug) {
console.debug(‘DVIDSVideoAnalytics PLAY EVENT’);
}
playEventAlreadyTriggered = true;

DynamicAnalytics.Ship(“DVIDS”, gaID, gaTitle, gaUrl);

}

});

mediaElement.addEventListener(‘play’, perform (e) {
if ($(“.mejs__controls”).is(“:hidden”) )
$(“.mejs__controls”).present();
// if overlay exists, conceal it
if ($(“.mejs__layer.video-overlay”).size)
$(“.mejs__layer.video-overlay”).conceal();
setAspectRatio();
});

mediaElement.addEventListener(‘ended’, perform (e) {

DVIDSVideoAnalytics.monitor(‘ended’, analyticsParams);
if(debug) {
console.debug(‘DVIDSVideoAnalytics ENDED EVENT’);
}

//play subsequent media

});

//$(‘#videoPlayer677’).css({‘width’: ‘100%’, ‘top’:’100%’});

// EVENT LISTENER FOR WHEN VIDEO TIME HAS BEEN UPDATED
mediaElement.addEventListener(‘timeupdate’, perform (e) {

// IF VIDEO HAS NOT BEEN PLAYED AND SAVED POSITION IS GREATER THAN 0
if (!videoHasPlayed && restartTimer > 0) {

// SET THE START TIME FROM THE RELATION IN SECONDS
myPlayer.setCurrentTime(restartTimer);

// SET THE VIDEO HAS PLAYED FLAG AND CLEAR THE TIMER
// OTHERWISE KEEP CONTINUAL LOOP GOING BACK TO THIS TIME
// THIS EVENT GETS CALLED AROUND EVERY 250MS
videoHasPlayed = true;
restartTimer = 0;
}
}, false);

mediaElement.addEventListener(‘canplay’, perform (e) {
CheckCaptions();
}, false);

mediaElement.addEventListener(‘pause’, perform (e) {
if (defaultButton.size) {
defaultButton.removeAttr(“model”);
hoverButton.removeAttr(“model”);
playEventButtonTriggered = false;
}
}, false);

mbOptions.delegate(“a”, “click on”, perform () {
var obj = $(this);
if (obj.hasClass(“chosenMBLink”)) {
return false;
}
else {
mbOptions.discover(“a.chosenMBLink”).removeClass(“chosenMBLink”);
obj.addClass(“chosenMBLink”);
currentVideoHeight = obj.html().substring(0, obj.html().size – 1);
setPlayerSource(obj.attr(“fileurl”));
}
mbOptions.conceal();
return false;
});
// ASSIGN CAPTIONS SELECTOR TO JQUERY OBJECT, SET CLICK DELEGATE AND TURN ON CAPTIONS IF PREVIOUSLY ENABLED
captionsSelector = $(“div.mejs-captions-selector”);
captionsSelector.delegate(“enter:radio”, “click on”, perform () {
var lang = this.worth;
if (lang == “none”) {
dvpCCEnabled = false;
}
else {
dvpCCEnabled = true;
}
});
turnOnCaptionsIfEnabled();
}
});

$window.on(“resize”, perform () {
var debouncedFn = debounce(calculateVideoHeight, 250);
debouncedFn();
});

// AUTOMATICALLY PLAY VIDEO IF ID PASSED OR VIDEO CLICKED
if (false) {
playVideo();
//doc.getElementById(‘videoPlayer677’).play();
}
});

perform updateMultiBandwithAnchors(recordsdata, videoHeight) {
var mbOptions = $(“#multiBandwidthOptions”);
var multiBandwidthHTML = [];
for (var i = 0; i ” + recordsdata[i].top + “p”);
}
else {
if (recordsdata[i].top != recordsdata[i+1].top) {
multiBandwidthHTML.unshift(“” + recordsdata[i].top + “p”); } } } multiBandwidthHTML.push(“”); mbOptions.html(multiBandwidthHTML.be a part of(“”)); var mbAnchors = mbOptions.youngsters(“a”); for (i = 0; i

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *