Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS fallback when RTMP is blocked #69

Open
wwwyaron opened this issue Nov 27, 2016 · 2 comments
Open

HLS fallback when RTMP is blocked #69

wwwyaron opened this issue Nov 27, 2016 · 2 comments

Comments

@wwwyaron
Copy link

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

@flavioribeiro
Copy link
Member

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

@wwwyaron
Copy link
Author

wwwyaron commented Jan 2, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants