fix(safari): set playsInline attribute to true on the video element

The playsInline attribute needs to be set to true for video to be rendered on Safari on iOS
This commit is contained in:
Jaya Allamsetty 2020-04-14 12:05:03 -04:00 committed by Jaya Allamsetty
parent d632b6e13e
commit b7eda8df7a
2 changed files with 3 additions and 1 deletions

View File

@ -189,6 +189,7 @@ export default class SmallVideo {
if (isVideo) {
element.setAttribute('muted', 'true');
element.setAttribute('playsInline', 'true'); /* for Safari on iOS to work */
} else if (config.startSilent) {
element.muted = true;
}

View File

@ -63,7 +63,8 @@ class LargeVideo extends Component<Props> {
<video
autoPlay = { !this.props._noAutoPlayVideo }
id = 'largeVideo'
muted = { true } />
muted = { true }
playsInline = { true } /* for Safari on iOS to work */ />
</div>
</div>
{ interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES