mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
Merge pull request #998 from Stremio/feat/stream-converted-source
Feat/stream converted source
This commit is contained in:
commit
12c36f4df3
5 changed files with 17 additions and 16 deletions
|
|
@ -17,7 +17,7 @@
|
|||
"@babel/runtime": "7.26.0",
|
||||
"@sentry/browser": "8.42.0",
|
||||
"@stremio/stremio-colors": "5.2.0",
|
||||
"@stremio/stremio-core-web": "0.50.0",
|
||||
"@stremio/stremio-core-web": "0.51.0",
|
||||
"@stremio/stremio-icons": "5.8.0",
|
||||
"@stremio/stremio-video": "0.0.64",
|
||||
"a-color-picker": "1.2.1",
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ importers:
|
|||
specifier: 5.2.0
|
||||
version: 5.2.0
|
||||
'@stremio/stremio-core-web':
|
||||
specifier: 0.50.0
|
||||
version: 0.50.0
|
||||
specifier: 0.51.0
|
||||
version: 0.51.0
|
||||
'@stremio/stremio-icons':
|
||||
specifier: 5.8.0
|
||||
version: 5.8.0
|
||||
|
|
@ -1302,8 +1302,8 @@ packages:
|
|||
'@stremio/stremio-colors@5.2.0':
|
||||
resolution: {integrity: sha512-dYlPgu9W/H7c9s1zmW5tiDnRenaUa4Hg1QCyOg1lhOcgSfM/bVTi5nnqX+IfvGTTUNA0zgzh8hI3o3miwnZxTg==}
|
||||
|
||||
'@stremio/stremio-core-web@0.50.0':
|
||||
resolution: {integrity: sha512-SRE9nStgYNbhjJAw7mXfmM0wdnSLS4GMSJsSMTXvoGxnUgd+yisJUkN/9Sughe4t2IU7Uct8QWpdx9zFdlil+g==}
|
||||
'@stremio/stremio-core-web@0.51.0':
|
||||
resolution: {integrity: sha512-rCgUrnG31wINZxf35LMvT3Cm/h+hEaJTagne99I9W7Wz8cGdMotVUxFzV8bkJLZh7q19+HkIr4WnEizkXuUZpg==}
|
||||
|
||||
'@stremio/stremio-icons@5.8.0':
|
||||
resolution: {integrity: sha512-IVUvQbIWfA4YEHCTed7v/sdQJCJ+OOCf84LTWpkE2W6GLQ+15WHcMEJrVkE1X3ekYJnGg3GjT0KLO6tKSU0P4w==}
|
||||
|
|
@ -6561,7 +6561,7 @@ snapshots:
|
|||
|
||||
'@stremio/stremio-colors@5.2.0': {}
|
||||
|
||||
'@stremio/stremio-core-web@0.50.0':
|
||||
'@stremio/stremio-core-web@0.51.0':
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ const OptionsMenu = ({ className, stream, playbackDevices, extraSubtitlesTracks,
|
|||
}
|
||||
}, [streamingUrl, downloadUrl]);
|
||||
const onDownloadVideoButtonClick = React.useCallback(() => {
|
||||
if (streamingUrl || downloadUrl) {
|
||||
platform.openExternal(streamingUrl || downloadUrl);
|
||||
if (downloadUrl || streamingUrl ) {
|
||||
platform.openExternal(downloadUrl || streamingUrl);
|
||||
}
|
||||
}, [streamingUrl, downloadUrl]);
|
||||
|
||||
|
|
|
|||
|
|
@ -323,10 +323,10 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
setError(null);
|
||||
video.unload();
|
||||
|
||||
if (player.selected && streamingServer.settings?.type !== 'Loading') {
|
||||
if (player.selected && player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||
video.load({
|
||||
stream: {
|
||||
...player.selected.stream,
|
||||
...player.stream.content,
|
||||
subtitles: Array.isArray(player.selected.stream.subtitles) ?
|
||||
player.selected.stream.subtitles.map((subtitles) => ({
|
||||
...subtitles,
|
||||
|
|
@ -361,7 +361,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
shellTransport: services.shell.active ? services.shell.transport : null,
|
||||
});
|
||||
}
|
||||
}, [streamingServer.baseUrl, player.selected, forceTranscoding, casting]);
|
||||
}, [streamingServer.baseUrl, player.selected, player.stream, forceTranscoding, casting]);
|
||||
React.useEffect(() => {
|
||||
if (video.state.stream !== null) {
|
||||
const tracks = player.subtitles.map((subtitles) => ({
|
||||
|
|
|
|||
|
|
@ -7,11 +7,12 @@ const useStatistics = (player, streamingServer) => {
|
|||
const { core } = useServices();
|
||||
|
||||
const stream = React.useMemo(() => {
|
||||
return player.selected?.stream ?
|
||||
player.selected.stream
|
||||
:
|
||||
null;
|
||||
}, [player.selected]);
|
||||
if (player.stream?.type === 'Ready') {
|
||||
return player.stream.content;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}, [player.stream]);
|
||||
|
||||
const infoHash = React.useMemo(() => {
|
||||
return stream?.infoHash ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue