From: Chocobozzz Date: Tue, 6 Mar 2018 09:01:46 +0000 (+0100) Subject: Make it works on iOS X-Git-Tag: v1.0.0-alpha.4~2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0f56c6e5ff86158f6715d8b7ebc416b1fc0eca70;p=github%2FChocobozzz%2FPeerTube.git Make it works on iOS --- 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 () {