Make it works on iOS

This commit is contained in:
Chocobozzz 2018-03-06 10:01:46 +01:00
parent 635a5686e3
commit 0f56c6e5ff
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -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 () {