]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/embed.ts
Improve admin tables row expand
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / embed.ts
index d5b42a0259d065ac06423ddd527e5adb578f18b8..879850daf68adf461fbff343216f651b5d569f80 100644 (file)
@@ -129,7 +129,7 @@ export class PeerTubeEmbed {
 
       this.autoplay = this.getParamToggle(params, 'autoplay', false)
       this.controls = this.getParamToggle(params, 'controls', true)
-      this.muted = this.getParamToggle(params, 'muted', false)
+      this.muted = this.getParamToggle(params, 'muted', undefined)
       this.loop = this.getParamToggle(params, 'loop', false)
       this.title = this.getParamToggle(params, 'title', true)
       this.enableApi = this.getParamToggle(params, 'api', this.enableApi)
@@ -263,6 +263,9 @@ export class PeerTubeEmbed {
   private async buildDock (videoInfo: VideoDetails, configResponse: Response) {
     if (!this.controls) return
 
+    // On webtorrent fallback, player may have been disposed
+    if (!this.player.player_) return
+
     const title = this.title ? videoInfo.name : undefined
 
     const config: ServerConfig = await configResponse.json()