mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-19 22:57:51 +00:00
selectVideoImplementation uses server middleware
This commit is contained in:
parent
5a6dda4f0d
commit
59c6a69fcb
1 changed files with 6 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
const { HTMLVideo, YouTubeVideo, MPVVideo } = require('stremio-video');
|
||||
const { HTMLVideo, YouTubeVideo, MPVVideo, withStreamingServer } = require('stremio-video');
|
||||
|
||||
const selectVideoImplementation = (shell, stream) => {
|
||||
if (shell) {
|
||||
|
|
@ -6,10 +6,12 @@ const selectVideoImplementation = (shell, stream) => {
|
|||
}
|
||||
|
||||
if (stream) {
|
||||
if (stream.ytId) {
|
||||
return YouTubeVideo;
|
||||
} else {
|
||||
if (typeof stream.url === 'string') {
|
||||
return HTMLVideo;
|
||||
} else if (typeof stream.ytId === 'string') {
|
||||
return YouTubeVideo;
|
||||
} else if (typeof stream.infoHash === 'string') {
|
||||
return withStreamingServer(HTMLVideo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue