浏览代码

Add comment

customisations
alemart 1年前
父节点
当前提交
2854f7a0de
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      src/sources/video-source.ts

+ 6
- 2
src/sources/video-source.ts 查看文件

138
         // handle autoplay
138
         // handle autoplay
139
         return this._handleAutoPlay(video).then(video => {
139
         return this._handleAutoPlay(video).then(video => {
140
 
140
 
141
-            // Handle WebKit quirks
141
+            // handle WebKit quirks
142
             // note: navigator.vendor is deprecated. Alternatively, test GL_RENDERER == "Apple GPU"
142
             // note: navigator.vendor is deprecated. Alternatively, test GL_RENDERER == "Apple GPU"
143
             if(Utils.isIOS() || /Apple/.test(navigator.vendor)) {
143
             if(Utils.isIOS() || /Apple/.test(navigator.vendor)) {
144
 
144
 
210
                             // this is added for convenience
210
                             // this is added for convenience
211
                             document.body.addEventListener('pointerdown', () => video.play());
211
                             document.body.addEventListener('pointerdown', () => video.play());
212
 
212
 
213
-                            // display the interactive message only once
213
+                            // ask only once for user interaction
214
                             if(!displayedAlertMessage) {
214
                             if(!displayedAlertMessage) {
215
                                 alert(ALERT_MESSAGE);
215
                                 alert(ALERT_MESSAGE);
216
                                 displayedAlertMessage = true;
216
                                 displayedAlertMessage = true;
217
                             }
217
                             }
218
 
218
 
219
+                            // XXX what if the Session mode is inline? In this
220
+                            // case, this convenience code may be undesirable.
221
+                            // A workaround is to disable autoplay.
222
+
219
                         }
223
                         }
220
                         /*else {
224
                         /*else {
221
                             // play the video after the first interaction with the page
225
                             // play the video after the first interaction with the page

正在加载...
取消
保存