2020-08-07 23:03:19 +00:00
|
|
|
export interface PlayerStatusPlaying {
|
2020-08-07 11:40:11 +00:00
|
|
|
status: "playing";
|
|
|
|
|
|
|
|
timestampPlay: number;
|
|
|
|
timestampBuffer: number;
|
|
|
|
}
|
|
|
|
|
2020-08-07 23:03:19 +00:00
|
|
|
export interface PlayerStatusBuffering {
|
2020-08-07 11:40:11 +00:00
|
|
|
status: "buffering";
|
|
|
|
}
|
|
|
|
|
2020-08-07 23:03:19 +00:00
|
|
|
export interface PlayerStatusStopped {
|
2020-08-07 11:40:11 +00:00
|
|
|
status: "stopped";
|
|
|
|
}
|
|
|
|
|
2020-08-07 23:03:19 +00:00
|
|
|
export interface PlayerStatusPaused {
|
2020-08-07 11:40:11 +00:00
|
|
|
status: "paused";
|
|
|
|
}
|
|
|
|
|
|
|
|
export type PlayerStatus = PlayerStatusPlaying | PlayerStatusBuffering | PlayerStatusStopped | PlayerStatusPaused;
|
|
|
|
|
2020-07-20 17:08:13 +00:00
|
|
|
export interface VideoViewerEvents {
|
2020-08-07 11:40:11 +00:00
|
|
|
"action_toggle_side_bar": { shown: boolean },
|
|
|
|
"action_follow": { watcherId: string | undefined },
|
|
|
|
|
|
|
|
/* will trigger notify_watcher_info */
|
|
|
|
"query_watcher_info": {
|
|
|
|
watcherId: string
|
|
|
|
},
|
|
|
|
|
|
|
|
/* will trigger notify_watcher_status */
|
|
|
|
"query_watcher_status": {
|
|
|
|
watcherId: string
|
|
|
|
},
|
|
|
|
|
|
|
|
"query_followers": {
|
|
|
|
watcherId: string
|
|
|
|
},
|
|
|
|
|
|
|
|
"query_watchers": {},
|
|
|
|
"query_video": {},
|
|
|
|
|
2020-07-20 17:08:13 +00:00
|
|
|
"notify_show": {},
|
2020-08-07 11:40:11 +00:00
|
|
|
"notify_destroy": {},
|
|
|
|
|
|
|
|
"notify_watcher_list": {
|
|
|
|
watcherIds: string[],
|
|
|
|
|
|
|
|
followingWatcher: string | undefined
|
|
|
|
},
|
|
|
|
|
|
|
|
"notify_watcher_status": {
|
|
|
|
watcherId: string,
|
|
|
|
status: PlayerStatus
|
|
|
|
}
|
|
|
|
|
|
|
|
"notify_watcher_info": {
|
|
|
|
watcherId: string,
|
|
|
|
|
|
|
|
clientId: number,
|
|
|
|
clientUniqueId: string,
|
|
|
|
clientName: string,
|
|
|
|
|
|
|
|
isOwnClient: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
"notify_follower_list": {
|
|
|
|
watcherId: string,
|
|
|
|
followerIds: string[]
|
|
|
|
},
|
|
|
|
|
|
|
|
"notify_follower_added": {
|
|
|
|
watcherId: string,
|
|
|
|
followerId: string
|
|
|
|
},
|
|
|
|
|
|
|
|
"notify_follower_removed": {
|
|
|
|
watcherId: string,
|
|
|
|
followerId: string
|
|
|
|
},
|
|
|
|
|
|
|
|
"notify_following": {
|
|
|
|
watcherId: string | undefined
|
|
|
|
},
|
|
|
|
|
|
|
|
"notify_following_status": {
|
|
|
|
status: PlayerStatus
|
|
|
|
}
|
|
|
|
|
|
|
|
"notify_local_status": {
|
|
|
|
status: PlayerStatus
|
|
|
|
},
|
2020-07-20 17:08:13 +00:00
|
|
|
|
2020-08-07 11:40:11 +00:00
|
|
|
"notify_video": { url: string }
|
2020-07-20 17:08:13 +00:00
|
|
|
}
|