From 0f56c6e5ff86158f6715d8b7ebc416b1fc0eca70 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 6 Mar 2018 10:01:46 +0100 Subject: Make it works on iOS --- client/src/assets/player/video-renderer.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/assets/player/video-renderer.ts b/client/src/assets/player/video-renderer.ts index 174676ffa..e3415abd3 100644 --- a/client/src/assets/player/video-renderer.ts +++ b/client/src/assets/player/video-renderer.ts @@ -33,10 +33,14 @@ function renderMedia (file, elem: HTMLVideoElement, opts: RenderMediaOptions, ca let currentTime = 0 let renderer - if (VIDEOSTREAM_EXTS.indexOf(extension) >= 0) { - renderer = useVideostream() - } else { - renderer = useMediaSource() + try { + if (VIDEOSTREAM_EXTS.indexOf(extension) >= 0) { + renderer = useVideostream() + } else { + renderer = useMediaSource() + } + } catch (err) { + return callback(err) } function useVideostream () { -- cgit v1.2.3