Browse Source

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
j8
Jaya Allamsetty 5 years ago
parent
commit
b7eda8df7a

+ 1
- 0
modules/UI/videolayout/SmallVideo.js View File

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

+ 2
- 1
react/features/large-video/components/LargeVideo.web.js View File

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

Loading…
Cancel
Save