mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix: player and useStatistics - use player.stream
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
parent
4fba2a3770
commit
5f1841bfb8
2 changed files with 7 additions and 7 deletions
|
|
@ -323,8 +323,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
setError(null);
|
||||
video.unload();
|
||||
|
||||
// if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||
if (player.selected && player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||
if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||
video.load({
|
||||
stream: {
|
||||
...player.stream.content,
|
||||
|
|
|
|||
|
|
@ -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