HTML5 MSE Player - autostart in fullscreen

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

HTML5 MSE Player - autostart in fullscreen

Postby vitnett » Thu Mar 28, 2019 2:53 am

Hi,

My company is considering using Unreal Streaming Server for a cable TV info channel.
The idea is to switch between many IP cameras standing at different locations where also weather forecasts appear as an overlay to full-screen video.

To do this, however, we must be able to start HTML5 player in full screen automatically without buttons.
Someone who has an idea how this can be done?

Vitnett
vitnett
 
Posts: 0
Joined: Thu Mar 28, 2019 2:46 am

Re: HTML5 MSE Player - autostart in fullscreen

Postby admin » Thu Mar 28, 2019 11:10 am

You cannot go fullscreen automatically - browsers do not allow that. You must click on fullscreen button to go fullscreen.

The best you can do automatically is to make width and height of video element same as hosting browser window.

Get page playerResizableFitToWindow.html from our SDK at http://umediaserver.net/umediaserver/source.html
and take a look what it does.
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: HTML5 MSE Player - autostart in fullscreen

Postby vitnett » Fri Mar 29, 2019 7:59 am

I found that it`s possible to fix with css and predefined height/width

html, body {height: 100%; margin: 0;}
#wrapper {min-height: 100%;}* { box-sizing: border-box; }
#container {height: 100%;}

<div id="wrapper">
<UnrealHTML5VideoPlayer id="UNREALCam1"></UnrealHTML5VideoPlayer>
RunPlayer("UNREALCam1", 1920, 1080, "IP-adress", 5119, false, "UNREALCam1", "", true, false, 1, "", false) ;
</div>

Not pretty, but works like a charm.

So if you add a timeout to html code and points to next camera it will switch in fullscreen.
<body onload="setTimeout(function(){window.location = 'index2.html';}, 25000)">
vitnett
 
Posts: 0
Joined: Thu Mar 28, 2019 2:46 am

Re: HTML5 MSE Player - autostart in fullscreen

Postby admin » Fri Mar 29, 2019 8:17 am

That is cool! Thanks.
admin
Site Admin
 
Posts: 1030
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