MSE player - reconnect on error

Issues when playing live broadcasts with Unreal HTML5 MSE player on a web page

MSE player - reconnect on error

Postby kpgchd » Mon Dec 24, 2018 3:53 am

When player stops playing, due to network error, broadcast not available, server down, or any other reason etc.

How can we start playing again automatically..?
kpgchd
 
Posts: 0
Joined: Mon Nov 05, 2018 2:39 am

Re: MSE player - reconnect on error

Postby admin » Thu Dec 27, 2018 3:22 pm

In unreal_html5_player_script_v2.js
You need to locate the function RunWebSocket() -it's the last function in the script.

Inside of that function, after each call to closePlayback();
you need to add the following line:
setTimeout(function () { PlayStream(); }, 2000);

That will make the player reconnect in 2 seconds.
admin
Site Admin
 
Posts: 1042
Joined: Fri Aug 21, 2009 10:13 am

Re: MSE player - reconnect on error

Postby kpgchd » Fri Dec 28, 2018 5:59 am

Hi admin

Thanks for the reply...
I had put that coding as suggested. But video still get freeze at somewhere without any error (using chrome), usually when I am on some other .
And I have no idea now how to trace...
kpgchd
 
Posts: 0
Joined: Mon Nov 05, 2018 2:39 am

Re: MSE player - reconnect on error

Postby admin » Fri Dec 28, 2018 10:03 am

usually when I am on some other

what do you mean?

Are you using the latest unreal_html5_player_script_v2.js that was updated recently to fix Chrome pausing playback when switching to another tab?

Can you share your webpage so we can see?
You can send your webpage URL to techsupport@umediaserver.net
admin
Site Admin
 
Posts: 1042
Joined: Fri Aug 21, 2009 10:13 am


Return to Playing with HTML5 MSE Player

Who is online

Users browsing this forum: No registered users and 1 guest

cron