v2: global player, infinite scroll, image picker, threaded comments
This commit is contained in:
19
src/contexts/PlayerContext.ts
Normal file
19
src/contexts/PlayerContext.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { createContext } from "react";
|
||||
|
||||
export interface PlayerItem {
|
||||
embedUrl: string;
|
||||
title?: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface PlayerContextValue {
|
||||
current: PlayerItem | null;
|
||||
play(item: PlayerItem): void;
|
||||
stop(): void;
|
||||
}
|
||||
|
||||
export const PlayerContext = createContext<PlayerContextValue>({
|
||||
current: null,
|
||||
play: () => {},
|
||||
stop: () => {},
|
||||
});
|
||||
Reference in New Issue
Block a user