浏览代码

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 年前
父节点
当前提交
b7eda8df7a
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1
    0
      modules/UI/videolayout/SmallVideo.js
  2. 2
    1
      react/features/large-video/components/LargeVideo.web.js

+ 1
- 0
modules/UI/videolayout/SmallVideo.js 查看文件

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

+ 2
- 1
react/features/large-video/components/LargeVideo.web.js 查看文件

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

正在加载...
取消
保存