]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/test-embed.ts
Add duration in embed api playbackStatusUpdate
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / test-embed.ts
index e5e6365dc0a13e1f7d2914465be1be1d9d234575..a4b54782c7e8927ab078c4750ba0bf3f1eb742ad 100644 (file)
@@ -8,7 +8,7 @@ window.addEventListener('load', async () => {
   const videoId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[ 0 ]
 
   const iframe = document.createElement('iframe')
-  iframe.src = `/videos/embed/${videoId}?autoplay=1&controls=0&api=1`
+  iframe.src = `/videos/embed/${videoId}?api=1`
 
   const mainElement = document.querySelector('#host')
   mainElement.appendChild(iframe)
@@ -30,7 +30,7 @@ window.addEventListener('load', async () => {
   ]
 
   monitoredEvents.forEach(e => {
-    player.addEventListener(e as PlayerEventType, () => console.log(`PLAYER: event '${e}' received`))
+    player.addEventListener(e as PlayerEventType, (param) => console.log(`PLAYER: event '${e}' received`, param))
     console.log(`PLAYER: now listening for event '${e}'`)
   })