mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-18 23:32:44 +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);
|
setError(null);
|
||||||
video.unload();
|
video.unload();
|
||||||
|
|
||||||
// if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||||
if (player.selected && player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
|
||||||
video.load({
|
video.load({
|
||||||
stream: {
|
stream: {
|
||||||
...player.stream.content,
|
...player.stream.content,
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,12 @@ const useStatistics = (player, streamingServer) => {
|
||||||
const { core } = useServices();
|
const { core } = useServices();
|
||||||
|
|
||||||
const stream = React.useMemo(() => {
|
const stream = React.useMemo(() => {
|
||||||
return player.selected?.stream ?
|
if (player.stream?.type === 'Ready') {
|
||||||
player.selected.stream
|
return player.stream.content;
|
||||||
:
|
} else {
|
||||||
null;
|
return null;
|
||||||
}, [player.selected]);
|
}
|
||||||
|
}, [player.stream]);
|
||||||
|
|
||||||
const infoHash = React.useMemo(() => {
|
const infoHash = React.useMemo(() => {
|
||||||
return stream?.infoHash ?
|
return stream?.infoHash ?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue