Fix IOS embed player
authorChocobozzz <me@florianbigard.com>
Wed, 26 Feb 2020 14:01:22 +0000 (15:01 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 26 Feb 2020 14:01:22 +0000 (15:01 +0100)
client/src/standalone/videos/embed.ts

index c91ae08b97d260646df77da6e57511a7e0a95f3a..5213443fc54503a1baca3d775e18f72d3bd8ff59 100644 (file)
@@ -262,6 +262,9 @@ export class PeerTubeEmbed {
 
   private async buildDock (videoInfo: VideoDetails, configResponse: Response) {
     if (this.controls) {
+      // 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()