mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 09:01:48 +01:00
Does this fix it?
This commit is contained in:
parent
41fd23cf20
commit
c5251401e7
@ -42,7 +42,8 @@ export function TimeAction(props: Props) {
|
||||
const descriptor = useVideoPlayerDescriptor();
|
||||
const videoTime = useProgress(descriptor);
|
||||
const mediaPlaying = useMediaPlaying(descriptor);
|
||||
const { timeFormat, setTimeFormat } = useInterface(descriptor);
|
||||
const { setTimeFormat } = useControls(descriptor);
|
||||
const { timeFormat } = useInterface(descriptor);
|
||||
const { isMobile } = useIsMobile();
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useControls } from "@/video/state/logic/controls";
|
||||
import { getPlayerState } from "../cache";
|
||||
import { listenEvent, sendEvent, unlistenEvent } from "../events";
|
||||
import { VideoPlayerState, VideoPlayerTimeFormat } from "../types";
|
||||
@ -10,7 +11,6 @@ export type VideoInterfaceEvent = {
|
||||
isFullscreen: boolean;
|
||||
popoutBounds: null | DOMRect;
|
||||
timeFormat: VideoPlayerTimeFormat;
|
||||
setTimeFormat(timeFormat: VideoPlayerTimeFormat): void;
|
||||
};
|
||||
|
||||
function getInterfaceFromState(state: VideoPlayerState): VideoInterfaceEvent {
|
||||
@ -21,9 +21,6 @@ function getInterfaceFromState(state: VideoPlayerState): VideoInterfaceEvent {
|
||||
isFullscreen: state.interface.isFullscreen,
|
||||
popoutBounds: state.interface.popoutBounds,
|
||||
timeFormat: state.interface.timeFormat,
|
||||
setTimeFormat(timeFormat: VideoPlayerTimeFormat) {
|
||||
state.stateProvider?.setTimeFormat(timeFormat);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -173,10 +173,6 @@ export function createCastingStateProvider(
|
||||
updateSource(descriptor, state);
|
||||
}
|
||||
},
|
||||
setTimeFormat(format) {
|
||||
state.interface.timeFormat = format;
|
||||
updateInterface(descriptor, state);
|
||||
},
|
||||
providerStart() {
|
||||
this.setVolume(getStoredVolume());
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams";
|
||||
import { VideoPlayerTimeFormat } from "@/video/state/types";
|
||||
|
||||
type VideoPlayerSource = {
|
||||
source: string;
|
||||
@ -24,7 +23,6 @@ export type VideoPlayerStateController = {
|
||||
getId(): string;
|
||||
togglePictureInPicture(): void;
|
||||
setPlaybackSpeed(num: number): void;
|
||||
setTimeFormat(timeFormat: VideoPlayerTimeFormat): void;
|
||||
};
|
||||
|
||||
export type VideoPlayerStateProvider = VideoPlayerStateController & {
|
||||
|
@ -133,10 +133,6 @@ export function createVideoStateProvider(
|
||||
// update localstorage
|
||||
setStoredVolume(volume);
|
||||
},
|
||||
setTimeFormat(num) {
|
||||
state.interface.timeFormat = num;
|
||||
updateInterface(descriptor, state);
|
||||
},
|
||||
setSource(source) {
|
||||
if (!source) {
|
||||
resetStateForSource(descriptor, state);
|
||||
|
Loading…
Reference in New Issue
Block a user