mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
refactor(types): improve Player types
This commit is contained in:
parent
9cc81ac4c9
commit
75c571d168
1 changed files with 10 additions and 10 deletions
20
src/types/models/Player.d.ts
vendored
20
src/types/models/Player.d.ts
vendored
|
|
@ -1,4 +1,8 @@
|
|||
type PlayerVideo = Video & {
|
||||
type LibraryItemPlayer = Pick<LibraryItem, '_id'> & {
|
||||
state: Pick<LibraryItemState, 'timeOffset' | 'video_id'>,
|
||||
};
|
||||
|
||||
type VideoPlayer = Video & {
|
||||
upcomming: boolean,
|
||||
watched: boolean,
|
||||
progress: boolean | null,
|
||||
|
|
@ -6,12 +10,8 @@ type PlayerVideo = Video & {
|
|||
deepLinks: VideoDeepLinks,
|
||||
};
|
||||
|
||||
type PlayerMetaItem = Video & {
|
||||
videos: PlayerVideo[],
|
||||
};
|
||||
|
||||
type NextVideo = Video & {
|
||||
deepLinks: VideoDeepLinks,
|
||||
type MetaItemPlayer = MetaItemPreview & {
|
||||
videos: VideoPlayer[],
|
||||
};
|
||||
|
||||
type SelectedStream = Stream & {
|
||||
|
|
@ -27,9 +27,9 @@ type Subtitle = {
|
|||
|
||||
type Player = {
|
||||
addon: Addon | null,
|
||||
libraryItem: LibraryItem | null,
|
||||
metaItem: Loadable<PlayerMetaItem> | null,
|
||||
nextVideo: NextVideo | null,
|
||||
libraryItem: LibraryItemPlayer | null,
|
||||
metaItem: Loadable<MetaItemPlayer> | null,
|
||||
nextVideo: VideoPlayer | null,
|
||||
selected: {
|
||||
stream: SelectedStream,
|
||||
metaRequest: ResourceRequest,
|
||||
|
|
|
|||
Loading…
Reference in a new issue