An overview on requesting and tracking screen orientation changes.
RequestingSection titled Requesting
The player uses the native Screen Orientation API to lock and unlock the document’s orientation. You can request screen orientation changes by using the remote control or via methods on the player instance.
All Screen Orientation API methods are not available in all
browsers. For example, iOS Safari does not support
Remote ControlSection titled Remote Control
The media remote provides methods for dispatching
media-orientation-unlock-request events like so:
Learn more about the screen orientation lock types available.
MethodsSection titled Methods
unlock() methods on the
ScreenOrientationController can be used to change the
orientation like so:
StateSection titled State
The following screen orientation properties are available on the media store:
canOrientScreen: Whether the Screen Orientation API and required methods are available.
orientation: The current screen orientation.
StylingSection titled Styling
The following media data attributes are available for styling based on the current screen orientation state:
EventsSection titled Events
The following events are available for detecting screen orientation changes: