From ed9f9f5fb04437b8dcf164fd0ae9c29b90826096 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Dec 2017 11:20:54 +0100 Subject: Fix changing video we are watching --- client/src/assets/player/peertube-videojs-plugin.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client/src/assets/player/peertube-videojs-plugin.ts') diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 4ba37b7d9..4898c1efe 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -283,6 +283,12 @@ const peertubePlugin = function (options: PeertubePluginOptions) { } } + player.setVideoFiles = function (files: VideoFile[]) { + player.videoFiles = files + + player.updateVideoFile(undefined, () => player.play()) + } + player.ready(function () { const controlBar = player.controlBar -- cgit v1.2.3