Загрузка плеера

window.bxPlayerOnloadbx_flv_player_978368114 = function(config)
{
if (typeof config != 'object')
config = {'file':'https://www.youtube.com/watch?v=s5nHb5_PJJ8&feature=youtu.be','height':'400','width':'500','dock':true,'id':'bx_flv_player_978368114','controlbar':'bottom','flashplayer':'/bitrix/components/bitrix/player/mediaplayer/player','logo.hide':'true','repeat':'N','bufferlength':'10','provider':'youtube','abouttext':'1С-Битрикс: Медиа-плеер','aboutlink':'http://www.1c-bitrix.ru/products/cms/features/mediaplayer.php'};

jwplayer("bx_flv_player_978368114_div").setup(config);

jwplayer("bx_flv_player_978368114_div").onReady(function()
{
try{
var pWmode = BX.findChild(BX("bx_flv_player_978368114_div"), {tagName: "PARAM", attribute: {name: "wmode"}});
if (pWmode)
pWmode.value = "transparent";

var pEmbed = BX.findChild(BX("bx_flv_player_978368114_div"), {tagName: "EMBED"});
if (pEmbed && pEmbed.setAttribute)
pEmbed.setAttribute("wmode", "transparent");
}catch(e){}
});
};

if (window.jwplayer) // jw script already loaded
{
setTimeout(bxPlayerOnloadbx_flv_player_978368114, 100);
}
else
{
BX.addCustomEvent(window, "onPlayerJWScriptLoad", function(){setTimeout(bxPlayerOnloadbx_flv_player_978368114, 100);});
if (!window.bPlayerJWScriptLoaded)
{
window.bPlayerJWScriptLoaded = true;
// load jw scripts once
BX.loadScript('/bitrix/components/bitrix/player/mediaplayer/jwplayer.js', function(){setTimeout(function()
{
BX.onCustomEvent(window, "onPlayerJWScriptLoad");
}, 100);});
}
}
В вашем браузере отключен JavaScriptПодробнее...


Обсудить  

Читайте также


Комментарии Кто голосовал Похожие новости

Комментарии