1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

changed youtube appearance

This commit is contained in:
Fedor Katurov 2020-04-18 22:06:34 +07:00
parent 4ab2c7f885
commit 8ff9fdd9bd
3 changed files with 22 additions and 16 deletions

View file

@ -3,14 +3,21 @@ import { PLAYER_HANDLERS } from './handlers';
import { PLAYER_STATES } from './constants';
import { IFile } from '../types';
interface IYoutubeInfo {
title: string;
thumbnail: string;
}
export type IPlayerState = Readonly<{
status: typeof PLAYER_STATES[keyof typeof PLAYER_STATES];
file: IFile;
youtubes: Record<string, IYoutubeInfo>;
}>;
const INITIAL_STATE: IPlayerState = {
status: PLAYER_STATES.UNSET,
file: null,
youtubes: {},
};
export default createReducer(INITIAL_STATE, PLAYER_HANDLERS);