stremio-web/src/routes/Player/Video/useVideoImplementation.js
2019-09-25 17:56:34 +03:00

19 lines
378 B
JavaScript

const { HTMLVideo, YouTubeVideo, MPVVideo } = require('stremio-video');
const useVideoImplementation = (shell, stream) => {
if (shell) {
return MPVVideo;
}
if (stream) {
if (stream.ytId) {
return YouTubeVideo;
} else {
return HTMLVideo;
}
}
return null;
};
module.exports = useVideoImplementation;