how to horizontal display videoCanvas in vow-player.html

It is our default example WS Player Min in iOS Safari, iPhone6
I just rotate device to horizontal position.
Vertical view

IMG_0255.PNG

Horizontal view

IMG_0256.PNG
 
Last edited:
You can try to rotate you video <canvas> element to 180 degree
Using similar JavaScript code:
Code:
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.rotate(Math.PI/180);
 
I add below code , but no change

//add listeners
f.addListener(WCSEvent.ErrorStatusEvent, errorEvent);
f.addListener(WCSEvent.ConnectionStatusEvent, connectionStatusListener);
f.addListener(WCSEvent.StreamStatusEvent, streamStatusListener);
var configuration = new Configuration();
configuration.wsPlayerCanvas = document.getElementById('videoCanvas');
contents=configuration.wsPlayerCanvas.getContext("2d"); // add by my
contents.rotate(30*Math.PI/180); // add by my

configuration.wsPlayerReceiverPath = "WSReceiver.js";
configuration.videoWidth = 320;
configuration.videoHeight = 240;
in vow-player.js
 
I have tried. It seems canvas video rotation is not currently supported in our websocket player.
Canvas itself is rotated but it does not take effect for video. So currently this can be added as a custom feature only.
 
Yes it is possible and such transformation requires additional code from our end.
 
Top