aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-27 08:39:44 +0200
committerChocobozzz <me@florianbigard.com>2020-08-27 08:39:44 +0200
commit1a568b6fcae4cd64458bb2d53543bffd1a3baabc (patch)
treea250dccd0b35d421224034a4cc288d4b3731db84
parent23f5be5e245aee4b252889a40a8d474d33623626 (diff)
downloadPeerTube-1a568b6fcae4cd64458bb2d53543bffd1a3baabc.tar.gz
PeerTube-1a568b6fcae4cd64458bb2d53543bffd1a3baabc.tar.zst
PeerTube-1a568b6fcae4cd64458bb2d53543bffd1a3baabc.zip
Fix play of videos on ios
When the user already played a video
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts2
-rw-r--r--client/src/assets/player/peertube-player-manager.ts4
2 files changed, 6 insertions, 0 deletions
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 {
117 } 117 }
118 118
119 async ngOnInit () { 119 async ngOnInit () {
120 PeertubePlayerManager.initState()
121
120 this.serverConfig = this.serverService.getTmpConfig() 122 this.serverConfig = this.serverService.getTmpConfig()
121 123
122 this.configSub = this.serverService.getConfig() 124 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 {
119 119
120 private static alreadyPlayed = false 120 private static alreadyPlayed = false
121 121
122 static initState () {
123 PeertubePlayerManager.alreadyPlayed = false
124 }
125
122 static async initialize (mode: PlayerMode, options: PeertubePlayerManagerOptions, onPlayerChange: (player: videojs.Player) => void) { 126 static async initialize (mode: PlayerMode, options: PeertubePlayerManagerOptions, onPlayerChange: (player: videojs.Player) => void) {
123 let p2pMediaLoader: any 127 let p2pMediaLoader: any
124 128