From 1a568b6fcae4cd64458bb2d53543bffd1a3baabc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 27 Aug 2020 08:39:44 +0200 Subject: Fix play of videos on ios When the user already played a video --- client/src/app/+videos/+video-watch/video-watch.component.ts | 2 ++ client/src/assets/player/peertube-player-manager.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index f048edec4..8e6d62a09 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -117,6 +117,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } async ngOnInit () { + PeertubePlayerManager.initState() + this.serverConfig = this.serverService.getTmpConfig() this.configSub = this.serverService.getConfig() diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index 4d72523f7..af044c864 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts @@ -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 -- cgit v1.2.3