Quantcast
Channel: support.jwplayer.com :: Streaming
Viewing all articles
Browse latest Browse all 2800

Chrome Fail to Reload Playback RTMP Source

$
0
0
Hi, I have embed some media source (RTML,HLS and Dash) to my jwplayer local hosted premium, I'm working on a button there to trigger only audio playback and back to video if the button got click again. At the 1st load it worked just find until the button got another click (from audio only state back to source with video/audio) somehow it fail to load. If I only switch between HLS multibitrate format and HLS audio only format with this plugin it work just fine. This issue only happen in chrome, is there anyone have the solutions for this ? Here are my setup and plugin "image":"http://static.mu........32k_ply.jpeg", "sources":[ {"file":"rtmp://f2879a.entrypoint.cloud.wowza.com:1935/foo..../bar"}, {"file":"http://wowzaprodhd19-lh.akamaihd.net/i/foo.../master.m3u8"}, {"file":"http://f2879a.entrypoint.cloud.wowza.com:1935/foo..../bar/manifest.f4m"}, {"file":"http://wowzaprodhd19-lh.akamaihd.net/i/foo..._1@437821/index_44_a-p.m3u8?sd=10&rebase=on","label":"audio"} ], var ao = function(f){ var s=null,aus=[],swp=[]; try {s=f.getPlaylist()[0]['allSources'];}catch(err){} console.log(s); if(s !== null){ if(/^audio/i.test(s[f.getPlaylistIndex()]['label'])){ aus=s;aus.push(aus.shift()); }else{ for (var i = 0; i < s.length; i++) { try{tl=s[i]['label'];}catch(err){} if(/^audio/i.test(tl)){swp.unshift(s[i]);continue;} swp.push(s[i]); } aus=swp;swp=null; } var elm = document.getElementsByClassName('jw-icon jw-icon-inline jw-button-color jw-reset jw-audio-only')[0].childNodes[0]; console.log(elm.className); if(/icon-videocam_off/i.test(elm.className)){ elm.classList.remove('icon-videocam_off'); elm.classList.add('icon-videocam'); }else{ elm.classList.remove('icon-videocam'); elm.classList.add('icon-videocam_off'); } try{swp=f.getPlaylist()[0]['image']}catch(err){} playerInstance.load({"sources":aus,"image":swp}); playerInstance.play(); } } Thanks, Ali

Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>