Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix setting video subtitle in URL

Chocobozzzf2b4f409a3f9
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 e68fd91f7b..51663a1ab3 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -797,6 +797,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
startTime,
stopTime: urlOptions.stopTime,
+ subtitle: urlOptions.subtitle,
+
embedUrl: video.embedUrl,
embedTitle: video.name,
diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts
index 2bfbf18fee..7aff312f7d 100644
--- a/client/src/assets/player/shared/peertube/peertube-plugin.ts
+++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts
@@ -115,6 +115,8 @@ class PeerTubePlugin extends Plugin {
return
}
+ if (this.currentSubtitle === showing.language) return
+
this.currentSubtitle = showing.language
saveLastSubtitle(showing.language)
savePreferredSubtitle(showing.language)