Orchard/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Scripts/cloudmedia-videoplayer-main.js

55 lines
11 KiB
JavaScript
Raw Normal View History

/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
/// <reference path="Typings/jquery.d.ts" />
/// <reference path="Typings/underscore.d.ts" />
var Orchard;
(function (Orchard) {
var Azure;
(function (Azure) {
var MediaServices;
(function (MediaServices) {
var VideoPlayer;
(function (VideoPlayer) {
var Injectors = Orchard.Azure.MediaServices.VideoPlayer.Injectors;
$(function () {
$(".cloudmedia-videoplayer-container").each(function (index, elem) {
var container = elem;
var assetData = $(elem).data("cloudvideo-player-assetdata");
var playerWidth = $(elem).data("cloudvideo-player-width");
var playerHeight = $(elem).data("cloudvideo-player-height");
var applyMediaQueries = $(elem).data("cloudvideo-player-applymediaqueries");
var autoPlay = $(elem).data("cloudvideo-player-autoplay");
var contentBaseUrl = $(elem).data("cloudvideo-player-content-baseurl");
var errorText = $(elem).data("cloudvideo-player-errortext");
var altText = $(elem).data("cloudvideo-player-alttext");
var retryText = $(elem).data("cloudvideo-player-retrytext");
function invokeInjectors() {
$(container).empty();
var alternateContent = [
$("<span>").addClass("cloudvideo-player-error-text").text(errorText),
$("<button>").addClass("cloudvideo-player-retry-button").text(retryText).click(function () {
invokeInjectors();
}),
$("<span>").addClass("cloudvideo-player-alt-text").text(altText)
];
// Construct a chain of injectors (each will invoke the next on failure).
var altInjector = new Injectors.AltInjector(container, playerWidth, playerHeight, assetData, applyMediaQueries, true, null, alternateContent);
var html5Injector = new Injectors.Html5Injector(container, playerWidth, playerHeight, autoPlay, assetData, applyMediaQueries, true, altInjector);
var dashInjector = new Injectors.DashInjector(container, playerWidth, playerHeight, autoPlay, assetData, applyMediaQueries, true, html5Injector);
var smpInjector = new Injectors.SmpInjector(container, playerWidth, playerHeight, autoPlay, assetData, applyMediaQueries, true, dashInjector, contentBaseUrl);
var firstInjector = smpInjector;
firstInjector.invoke();
}
invokeInjectors();
});
});
})(VideoPlayer = MediaServices.VideoPlayer || (MediaServices.VideoPlayer = {}));
})(MediaServices = Azure.MediaServices || (Azure.MediaServices = {}));
})(Azure = Orchard.Azure || (Orchard.Azure = {}));
})(Orchard || (Orchard = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsb3VkbWVkaWEtdmlkZW9wbGF5ZXItbWFpbi5qcyIsImNsb3VkbWVkaWEtdmlkZW9wbGF5ZXItbWFpbi50cyJdLCJuYW1lcyI6WyJPcmNoYXJkIiwiT3JjaGFyZC5BenVyZSIsIk9yY2hhcmQuQXp1cmUuTWVkaWFTZXJ2aWNlcyIsIk9yY2hhcmQuQXp1cmUuTWVkaWFTZXJ2aWNlcy5WaWRlb1BsYXllciIsImludm9rZUluamVjdG9ycyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEFDTEEsNENBQTRDO0FBQzVDLGdEQUFnRDtBQUVoRCxJQUFPLE9BQU8sQ0E0Q2I7QUE1Q0QsV0FBTyxPQUFPO0lBQUNBLElBQUFBLEtBQUtBLENBNENuQkE7SUE1Q2NBLFdBQUFBLEtBQUtBO1FBQUNDLElBQUFBLGFBQWFBLENBNENqQ0E7UUE1Q29CQSxXQUFBQSxhQUFhQTtZQUFDQyxJQUFBQSxXQUFXQSxDQTRDN0NBO1lBNUNrQ0EsV0FBQUEsV0FBV0EsRUFBQ0EsQ0FBQ0E7Z0JBRzVDQyxJQUFPQSxTQUFTQSxHQUFHQSxPQUFPQSxDQUFDQSxLQUFLQSxDQUFDQSxhQUFhQSxDQUFDQSxXQUFXQSxDQUFDQSxTQUFTQSxDQUFDQTtnQkFFckVBLENBQUNBLENBQUNBO29CQUNFLENBQUMsQ0FBQyxtQ0FBbUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLEtBQUssRUFBRSxJQUFJO3dCQUM3RCxJQU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