jbilcke-hf HF staff commited on
Commit
7c95c79
2 Parent(s): b5e7079 cd0c4c8

Merge branch 'main' of https://huggingface.co/spaces/jbilcke-hf/AI-WebTV

Browse files
Files changed (1) hide show
  1. public/index.html +9 -0
public/index.html CHANGED
@@ -56,6 +56,15 @@
56
  window.location.reload()
57
  }, 1200)
58
  }, false)
 
 
 
 
 
 
 
 
 
59
  player.play()
60
  }
61
  })()
 
56
  window.location.reload()
57
  }, 1200)
58
  }, false)
59
+
60
+ // Handle autoplay restrictions.
61
+ let promise = videoElement.play()
62
+ if (promise !== undefined) {
63
+ videoElement.addEventListener('click', function() {
64
+ videoElement.play()
65
+ })
66
+ }
67
+
68
  player.play()
69
  }
70
  })()