Need Player with Tiktok style resolution of video

President

New Member
How can we fit video into mobile screen same as a tiktok.. need responsive ui 9:16. how can we do it in player
 
Last edited:

Max

Administrator
Staff member
Good day.
You can set appropriate aspect ratio with constraints while publishing
Code:
session.createStream({name:"stream1", display: localVideo, constraints:{audio:true, video:{width:360,height:640}}}).publish();
and playback if needed (in this case, transcoding will be enabled on server)
Code:
session.createStream({name:"stream1", display: remoteVideo, constraints:{audio:true, video:{width:360,height:640}}}).play();
 
Top