When WebRTC stream is published from mobile device, a device orientation can be changed. In this case, Android devices rotate picture itself, and iOS devices send picture orientation info in a stream
Rotation angle, degrees
A picture is rotated clockwise.
Publishing WebRTC stream with orientation info
To publish a WebRTC stream with orientation info
cvoExtension parameter should be passed to
Playing stream with orientation info as RTMP
Player side support is required to play a WebRTC stream with orientation info as RTMP. Thus, the following code should be added to Flash Streaming example:
If transcoding is used, for example if VP8+opus stream is published, it is necessary to set the following parameter in flashphoner.properties file for player to receive stream transcoded orientation info
If CDN is used, this parameter should be set on all CDN servers supposed to play RTMP stream from.
Mobile devices publishing issues
If mobile device screen rotation is enabled, a picture aspect ratio will change while device is turning from portrait to landscape and vice versa.
If mobile device screen rotation is disabled (for example, Lock Portait Orientation switch is set), a picture aspect ratio will remains the same as stream was published, but picture will turn according to device current orientation.
1. iOS Safari does not send picture orientation info when device is rotated to 180 degrees (upside down)
2. iOS 12 Safari stops sending video packets when device is rotated to 90 degrees right (from portrait to landscape)
3. A picture aspect ratio will change while device is turning from portrait to landscape and vice versa while publishing from Android device regardless of