Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Orientation info

Rotation angle, degrees

0

0

1

90

2

180

3

270

A picture is rotated clockwise.

...

Code Block
languagejs
themeRDark
    session.createStream({
        name: streamName,
        ...
        cvoExtension: true
    }).publish();

When stream is played via WebRTC, including CDN, apicture will rotate as set by device in orientation info.

Playing stream with orientation info as RTMP

...

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.

Known issues

1. iOS Safari does not send picture orientation info when device is rotated to 180 degrees (upside down)