mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-31 03:28:49 +00:00
19 lines
378 B
JavaScript
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;
|