clappr-rtmp-plugin icon indicating copy to clipboard operation
clappr-rtmp-plugin copied to clipboard

HLS fallback when RTMP is blocked

Open wwwyaron opened this issue 8 years ago • 2 comments
trafficstars

Hi, I'm trying to setup an HLS fallback in case where RTMP session is blocked by FW. here is my code: var options = { sources: ["rtmp://live.you.tv/live/3","http://live.you.tv/live/3/index.m3u8"], parentId: "#playerrtmp", autoPlay: true, width: "100%", height: "100%", rtmpConfig: { swfPath: 'dist/assets/RTMP.swf', scaling:'stretch', playbackType: 'live', bufferTime: 1, startLevel: 0 }, plugins: [RTMP] }; var player = new Clappr.Player(options);

When RTMP identifies a blocked session, it prompts:

Sun Nov 27 2016 02:27:59 PM.486 [INFO] [RTMP] MediaPlayer error: [Event type="mediaError" bubbles=false cancelable=false eventPhase=2]

but doesn't switch to the HLS path, which is also avaliable.

Any ideas how to address this issue? BR, Yaron

wwwyaron avatar Nov 27 '16 12:11 wwwyaron

@wwwyaron this issue should be fixed outside the rtmp plugin, possibly outside the player as well.

flavioribeiro avatar Jan 02 '17 11:01 flavioribeiro

Thanks for your answer! No problem dealing with assigning the right source (rtmp/HLS) outside the player, but is there a listener that can indicate rtmp mediaError?

wwwyaron avatar Jan 02 '17 11:01 wwwyaron