Baptista – Reșița

document.getElementById('blcPlayer').innerHTML=document.getElementById('blcPlayer').innerHTML.replace('%FLASH_REQ_VERSION%', '10.1');swfobject.embedSWF('http://embed.bisericilive.com/player.swf','blcPlayer','700','543','10.1','',{src:"http://resitabaptistaro.bisericilive.com/live/events/resitabaptistaro.f4m",autoPlay:"true",controlBarAutoHide:"true",playButtonOverlay:"true",poster:"",permanentOverlay:"",javascriptCallbackFunction:"SetupJSBridge"},{allowFullScreen:"true"},{name:"blcPlayer"}); SetupJSBridge = function (playerId, event, obj) { switch (event) { case "onJavaScriptBridgeCreated": this.flashPlayer = $("#" + playerId)[0]; this.flashPlayer.addEventListener("isDynamicStreamChange", "onDynamicStream"); this.flashPlayer.addEventListener("switchingChange", "onDynamicStream"); this.flashPlayer.addEventListener("autoSwitchChange", "onDynamicStream"); } };

onDynamicStream = function () { return setTimeout(updateDynamicStreamItems, 100); };

ds = $("#stream-control"); resolutions = []; resolutionsChecked = false; updateDynamicStreamItems = function () { var but, buts, currentStreamIndex, dynamicStreams, idx, isSwitching, item, _i, _j, _len, _len1, _this = this, isAutoSwitch; ds.empty(); if (this.flashPlayer) { dynamicStreams = this.flashPlayer.getStreamItems(); } if (!dynamicStreams) { return; }

isAutoSwitch = this.flashPlayer.getAutoDynamicStreamSwitch(); buts = $("

", { "class": "btn-group switcher" }); but = $("", { "class": "btn btn-small " + (isAutoSwitch ? " btn-success" : "btn-inverse"), text: "Selectare stream: " + (isAutoSwitch ? "Automat (recomandat)" : "Manual"), click: function () { return _this.flashPlayer.setAutoDynamicStreamSwitch(!_this.flashPlayer.getAutoDynamicStreamSwitch()); } }); buts.append(but); ds.append(buts); currentStreamIndex = this.flashPlayer.getCurrentDynamicStreamIndex(); isSwitching = this.flashPlayer.getDynamicStreamSwitching(); buts = $("
", { "class": "btn-group" }); if (!resolutionsChecked) { resolutions = []; for (idx = _i = 0, _len = dynamicStreams.length; _i ", { "class": "btn btn-small", title: Math.round(item.bitrate) + "kbps" }); but.append("" + sTitle + ""); if (resolutions[idx] > 0) { but.append(" (" + item.height + "p)"); } if (currentStreamIndex === idx) { but.addClass(isSwitching ? "btn-warning" : "btn-success"); } but.bind("click", { index: idx }, function (event) { return switchDynamicStreamIndex(event.data.index); }); buts.append(but); } return ds.append(buts); }; switchDynamicStreamIndex = function (index) { if (this.flashPlayer.getAutoDynamicStreamSwitch()) { this.flashPlayer.setAutoDynamicStreamSwitch(false); } return this.flashPlayer.switchDynamicStreamIndex(index); };

Adaugă comentariu

Acest sit folosește Akismet pentru a reduce spamul. Află cum sunt procesate datele comentariilor tale.