mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Move event type to enum
This commit is contained in:
parent
32a91eabf1
commit
1a172bdb1b
3 changed files with 12 additions and 7 deletions
|
@ -6,7 +6,7 @@ import RemotePlayButton from 'apps/experimental/components/AppToolbar/RemotePlay
|
|||
import SyncPlayButton from 'apps/experimental/components/AppToolbar/SyncPlayButton';
|
||||
import AppToolbar from 'components/toolbar/AppToolbar';
|
||||
import ViewManagerPage from 'components/viewManager/ViewManagerPage';
|
||||
import { SHOW_OSD_EVENT } from 'controllers/playback/video';
|
||||
import { EventType } from 'types/eventType';
|
||||
import Events, { type Event } from 'utils/events';
|
||||
|
||||
/**
|
||||
|
@ -23,10 +23,10 @@ const VideoPage: FC = () => {
|
|||
useEffect(() => {
|
||||
const doc = documentRef.current;
|
||||
|
||||
if (doc) Events.on(doc, SHOW_OSD_EVENT, onShowVideoOsd);
|
||||
if (doc) Events.on(doc, EventType.SHOW_VIDEO_OSD, onShowVideoOsd);
|
||||
|
||||
return () => {
|
||||
if (doc) Events.off(doc, SHOW_OSD_EVENT, onShowVideoOsd);
|
||||
if (doc) Events.off(doc, EventType.SHOW_VIDEO_OSD, onShowVideoOsd);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue