]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix play of videos on ios
authorChocobozzz <me@florianbigard.com>
Thu, 27 Aug 2020 06:39:44 +0000 (08:39 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 27 Aug 2020 06:39:44 +0000 (08:39 +0200)
When the user already played a video

client/src/app/+videos/+video-watch/video-watch.component.ts
client/src/assets/player/peertube-player-manager.ts

index f048edec4c943d09cd58c25252fb0779c58dab16..8e6d62a09c204638c2b095184c24fb7e41cc21eb 100644 (file)
@@ -117,6 +117,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
   }
 
   async ngOnInit () {
+    PeertubePlayerManager.initState()
+
     this.serverConfig = this.serverService.getTmpConfig()
 
     this.configSub = this.serverService.getConfig()
index 4d72523f7c9ce5e5d09c599052ae7c44074e3ff4..af044c864fb3f4e6c02151d1db06c65340f854eb 100644 (file)
@@ -119,6 +119,10 @@ export class PeertubePlayerManager {
 
   private static alreadyPlayed = false
 
+  static initState () {
+    PeertubePlayerManager.alreadyPlayed = false
+  }
+
   static async initialize (mode: PlayerMode, options: PeertubePlayerManagerOptions, onPlayerChange: (player: videojs.Player) => void) {
     let p2pMediaLoader: any