KMC Controls connects buildings to the Internet of Things

KMC Controls connects buildings to the Internet of Things

‘);

}
// create a quick array of language codes (assumes that these are in the same order)
for (var _z = 0; _z ” + _langName + “”);

//process the captions
var _caption = [];
// grab the

element
var _el = divElement.find(“p”);
// spin through the

for (var _y = 0; _y 0) {
var playerRoot = $(“#” + elementId);
playerRoot.find(‘.oo_controls’).append(‘

 

‘);

addCCButton(elementId);
//languageList – spin through the language list and grab the current CC captions
// first try full locale
captions = findCurrentCC(language, country);
if (captions.length == 0) {
captions = findCurrentCC(language);
}
}

}).fail(function (xmldata) {
console.log(“Did not get closed captions”);
});
}

// ***************************************************
// CREATE FUNCTION
// ***************************************************
function createPlayer(player) {
// call the resize
resizeVideo(player);

// set global message bus – use the window.messageBus object outside of this function
window.messageBus = player.mb;

// subscribe to resize event to resize for responsiveness
//player.subscribe(dellvideoplayer.EVENTS.SIZE_CHANGED, “myPage”, function (eventName) {
// resizeVideo(player);
//});

// detect flash – if no Flash, subscribe to events
var flashVideoPlayerObj = $(“object[id*=’OoFlash’]”);
if (flashVideoPlayerObj.length == 0) {

window.messageBus.subscribe(dellvideoplayer.EVENTS.PLAYER_CREATED, “myPage”, function (eventName, elementId, params) {
var flashVideoPlayerObj2 = $(“object[id*=’OoFlash’]”);
if (flashVideoPlayerObj2.length == 0) {
getClosedCaptions(‘en’, ‘us’, elementId);
}
});

window.messageBus.subscribe(dellvideoplayer.EVENTS.PLAYING, “myPage”, function (eventName) {
window.messageBus.unsubscribe(dellvideoplayer.EVENTS.PLAYING, “myPage”);
// event16 – start
if (typeof (s_dell) != ‘undefined’) {
s_dell.linkTrackVars = ‘prop2,prop13,prop49,eVar24’;
s_dell.linkTrackEvents = ‘event16’;
s_dell.events = s_dell.apl(s_dell.events, ‘event16’, ‘,’, 2);
s_dell.eVar24 = player.embedCode;
s_dell.tl(true, ‘o’, player.embedCode);
}
});
window.videoEightyPercent = false;
window.videoComplete = false;
window.messageBus.subscribe(dellvideoplayer.EVENTS.PLAYHEAD_TIME_CHANGED, “myPage”, function (eventName, currentTime, totalTime) {
var perc = currentTime / totalTime;

if (typeof (s_dell) != ‘undefined’) {
if (perc >= 0.8 && perc = 1 && !window.videoComplete) {
window.videoComplete = true;
s_dell.linkTrackVars = ‘prop2,prop13,prop49,eVar24’;
s_dell.linkTrackEvents = ‘event34’;
s_dell.events = s_dell.apl(s_dell.events, ‘event34’, ‘,’, 2);
s_dell.eVar24 = player.embedCode;
s_dell.tl(true, ‘o’, player.embedCode);
}
}

onPlayheadTimeChanged(currentTime);
});
}

}

//allow full screen for modal videos
if (typeof (window.top.document) != ‘undefined’ && typeof ($(document) != ‘undefined’) && window.top.document != $(document)) {
$(window.top.document).find(‘.uif_modal_iframe’).attr(‘allowfullscreen’, true);
$(window.top.document).find(‘.uif_modal_iframe’).attr(‘mozallowfullscreen’, true);
$(window.top.document).find(‘.uif_modal_iframe’).attr(‘webkitallowfullscreen’, true);

//for browse modals
$(window.top.document).find(‘.modalFrame’).attr(‘allowfullscreen’, true);
$(window.top.document).find(‘.modalFrame’).attr(‘mozallowfullscreen’, true);
$(window.top.document).find(‘.modalFrame’).attr(‘webkitallowfullscreen’, true);
}

/*
Get the localized language name for each locale code
e.g. “en-US” = “English (US)”
*/
function mapLanguageCodes(localeCode) {
switch (localeCode.toLowerCase()) {
case “da”:
return “Dansk”;
case “de”:
return “Deutsch”;
case “en”:
return “English”;
case “en-us”:
return “English (US)”;
case “en-uk”:
return “English (UK)”;
case “es”:
return “Español”;
case “fr”:
return “Français”;
case “hi”:
return “हिन्दी”;
case “it”:
return “Italiano”;
case “ja”:
return ‘日本語’;
case “ko”:
return “조선말, 한국어”;
case “nl”:
return “Nederlands”;
case “pt”:
case “pt-pt”:
return “Português”;
case “pt-br”:
return “Português (Brasil)”;
case “zh-hans”:
return “简体中文”;
case “zh-hant”:
return “繁體中文”;
case “ar”:
return “Arabic”;
case “cs”:
return “Czech”;
case “el”:
return “Greek”;
case “fi”:
return “Finnish”;
case “fr-ca”:
return “Français (Canada)”;
case “he”:
return “Hebrew”;
case “hu”:
return “Hungarian”;
case “no”:
return “Norweigan”;
case “pl”:
return “Polish”;
case “ro”:
return “Romanian”;
case “ru”:
return “Russian”;
case “sv”:
return “Swedish”;
case “tr”:
return “Turkish”;
}
}

function changeCC(obj) {
if ($(this).hasClass(“ccLanguage-disabled”) == false) {
var _langStr = obj.target.attributes.data.nodeValue;
captions = findCurrentCC(_langStr);
$(“#ccLanguageModal”).trigger(‘reveal:close’);
$(“#videoLanguage01”).hide();
$(“#cc_icon”).attr(“lanHidden”, “true”);
}
window.messageBus.publish(dellvideoplayer.EVENTS.PLAY);
}

function onPlayheadTimeChanged(currentTime) {
var _playheadTime = currentTime;
var currentCaption;
// determine the language
for (var caption in captions) {
var caption = captions;
if (_playheadTime > caption[“begin”]) {
if (_playheadTime

“);
$(“#cc_icon”).bind(“click”, “”, ccButtonHandler);
var playerId = elementId;
var playerObj = $(“#” + playerId);
var vodNode = playerObj.find(“.vod”);
playerObj.find(‘.oo_controls’).attr(“cc”, “cc”);
var ccPopupHtml = ‘

‘;
$(vodNode).append(ccPopupHtml);
$(“#videoLanguage01”).append($(“#ccLanguageModal”));
$(“#ccLanguageModal”).show();
$(“#videoLanguage01”).hide();
$(“#cc_icon”).attr(“lanHidden”, “true”);
}

function resizeCaptions() {
$(“#captionsContainer”).css(“height”, $(“#caption”).height());
$(“#captionsContainer”).css(“top”, (-$(“#caption”).height() – 10) + “px”);
$(“#captionBackground”).css(“width”, $(“#caption”).width());
$(“#captionBackground”).css(“left”, (($(“#captionsContainer”).width() – $(“#caption”).width()) / 2) + “px”);
$(“#captionBackground”).css(“height”, $(“#caption”).height());
$(“#caption”).css(“left”, $(“#captionBackground”).css(“left”));
}

function offCaptions() {
if ($(“#off-caption”).hasClass(“disabled”)) {
$(“#off-caption”).removeClass(“disabled”);
$(“#on-caption”).addClass(“disabled”);
$(“#captionsContainer”).hide();
$(“#listLanguages”).hide();
$(“.ccLanguage”).addClass(“ccLanguage-disabled”);
$(“#videoLanguage01”).hide();
$(“#cc_icon”).attr(“lanHidden”, “true”);
window.messageBus.publish(dellvideoplayer.EVENTS.PLAY);
}
}

function onCaptions() {
if ($(“#on-caption”).hasClass(“disabled”)) {
$(“#on-caption”).removeClass(“disabled”);
$(“#off-caption”).addClass(“disabled”);
$(“#captionsContainer”).show();
$(“#listLanguages”).show();
$(“.ccLanguage”).removeClass(“ccLanguage-disabled”);
}
}

Scroll to Top