Change video resolution when playing a file from disk

260 views
Skip to first unread message

fazia....@gmail.com

unread,
Jun 23, 2016, 2:23:33 AM6/23/16
to kurento
I am using the example "Play media to WebRTC"  in which the tutorial reads a file from disk and plays the video to WebRTC. My question is that when i am playing the video can I change the resolution of the video i am viewing. I want to change the height and width of the video based on the viewport.
In your tutorial i have tried changed the following 
 var userMediaConstraints = {
      audio : true,
      video : true
   }

to this

var userMediaConstraints = {
   "audio": true,
   "video": {
       "width": {
           "min": "889",
           "max": "1507"
       },
       "height": {
           "min": "472",
           "max": "480"
       },
       "frameRate": {
           "min": "2"
       }
   }
}

but i cannot see any changes in the output video. Please let me know if it is possible
Thank you
Fazia Fatima

Fazia Fatima

unread,
Jun 23, 2016, 6:33:40 AM6/23/16
to kurento
Nevermind...... i have tried stretching the video tag of the html5 for now. If this can be done from kurento, please let me know 

Ivan Gracia

unread,
Jun 24, 2016, 12:54:48 AM6/24/16
to Kurento Public
I'm afraid not, that can not be changed server-side out of the box. Either you negotiate a new connection or resize the video tag.

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fazia Fatima

unread,
Jun 24, 2016, 1:10:54 AM6/24/16
to kurento
Thank you Ivan for your reply. I have modified the video tag dimensions. Now the video gets resized according to the viewport.

Fazia Fatima
Reply all
Reply to author
Forward
0 new messages