Full Screen - How to do ?!

75 views
Skip to first unread message

Anthony

unread,
May 30, 2020, 4:32:40 PM5/30/20
to Ant Media Server
Hi 
It is possible to have an example (help) on how to set the resolution and aspect ratio values to have an "always" Full Screen image (Video that fills the whole screen). 

Is it possible?

This for Publish and Play Examples ..... 

Many Thanks

Selim Emre

unread,
May 30, 2020, 5:06:55 PM5/30/20
to Ant Media Server
Hi Anthony,

Have a good day. I developed this feature. It's on PR(https://github.com/ant-media/StreamApp/pull/47)

Btw, you can change your play.html and player.css according to my PR. Please check it -> https://github.com/ant-media/StreamApp/pull/47/files

Best Regards,
Selim

Anthony

unread,
May 31, 2020, 5:48:27 AM5/31/20
to Ant Media Server
Many Thanks Selim. 
Now I will try.

However I thought, since the player has the "FullScreen" function (and Picture in Picture) it would not be possible to activate a simple "fullscreen" function when the page is loaded? (onload event)? .. for example ... <body onload = "fullscreeen ()"> ..... for example?!

Selim Emre

unread,
Jun 1, 2020, 8:00:39 AM6/1/20
to Ant Media Server

Anthony

unread,
Jun 1, 2020, 11:03:57 AM6/1/20
to Ant Media Server
Hi Selim.

Thank you very much.

However I tried your example and it works well, congratulations. 
The only thing I don't understand is because the aspect ratio is 4: 3 and my web camera is definitely 16: 9 (1280 x 720 30 fps). Maybe it's because the publish page already acquires in 4: 3 mode?

Is there a way in your play example to adjust (force) the aspect ratio ?? Or a way to take action on the Publish page ??

Thank you....

Kevin Maude

unread,
Jun 1, 2020, 11:17:53 AM6/1/20
to Anthony, Ant Media Server
I’m also interested to know. I believe the 4:3 aspect is somewhere set on the server side. I can set the play.html to be a 16:9 player and the capture to be 16:9 as well however delivery is 4:3 in the 16:9 player. 

--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/00b87f6b-764a-4e12-8dc7-34419838a93f%40googlegroups.com.
--
Kevin Maude 206.972.0076 Sent from Mobile

Robert Berger

unread,
Jun 1, 2020, 2:18:02 PM6/1/20
to Anthony, Kevin Maude, Ant Media Server
Need to set mediaConstraints to:
var mediaConstraints = {
 video : {
   "width": {
   "min": 1280,
   "max": 1920
 },
 "height": {
   "min": 720,
   "max": 1080
   }
 },
 audio : true
};

Also for Antmedia folks, the new ability to switch video inputs in webrtc_adaptor.js doesn’t maintain these values :

In the function:
this.switchVideoCameraCapture = function(streamId, deviceId) 

if (typeof deviceId != "undefined" ) {
 thiz.mediaConstraints.video = { "deviceId": deviceId };
 }

Should become:

if (typeof deviceId != "undefined" ) {
 thiz.mediaConstraints.video = {...thiz.mediaConstraints.video, ...{ "deviceId": deviceId }};
 }

Robert J Berger
Omnyway CTO/SVP Engineering
http://www.linkedin.com/in/rberger
http://www.omnyway.com
Reply all
Reply to author
Forward
0 new messages