diff --git a/src/routes/Player/Video/selectVideoImplementation.js b/src/routes/Player/Video/selectVideoImplementation.js index c84586a10..787b5378d 100644 --- a/src/routes/Player/Video/selectVideoImplementation.js +++ b/src/routes/Player/Video/selectVideoImplementation.js @@ -1,19 +1,21 @@ // Copyright (C) 2017-2020 Smart code 203358507 -const { HTMLVideo, YouTubeVideo, MPVVideo, withStreamingServer } = require('stremio-video'); +const { HTMLVideo, YouTubeVideo, MPVVideo, withStreamingServer, withHTMLSubtitles } = require('stremio-video'); const selectVideoImplementation = (shell, stream) => { + // TODO handle stream.behaviorHints + // TODO handle IFrameVideo + // TODO handle ChromecastVideo + if (shell) { - return MPVVideo; + return withHTMLSubtitles(withStreamingServer(MPVVideo)); } if (stream) { - if (typeof stream.url === 'string') { - return HTMLVideo; - } else if (typeof stream.ytId === 'string') { - return YouTubeVideo; - } else if (typeof stream.infoHash === 'string') { - return withStreamingServer(HTMLVideo); + if (typeof stream.ytId === 'string') { + return withHTMLSubtitles(YouTubeVideo); + } else if (typeof stream.url === 'string' || typeof stream.infoHash === 'string') { + return withHTMLSubtitles(withStreamingServer(HTMLVideo)); } }