Double clicking on the video now opens the extended view
parent
ae83459c30
commit
2783fff2f1
|
@ -245,7 +245,12 @@ class ChannelVideoController {
|
|||
this.events.fire_react("notify_expended", { expended: this.expended });
|
||||
});
|
||||
|
||||
this.events.on("action_set_spotlight", event => this.setSpotlight(event.videoId));
|
||||
this.events.on("action_set_spotlight", event => {
|
||||
this.setSpotlight(event.videoId);
|
||||
if(!this.isExpended()) {
|
||||
this.events.fire("action_toggle_expended", { expended: true });
|
||||
}
|
||||
});
|
||||
|
||||
this.events.on("query_expended", () => this.events.fire_react("notify_expended", { expended: this.expended }));
|
||||
this.events.on("query_videos", () => this.notifyVideoList());
|
||||
|
|
|
@ -20,7 +20,7 @@ export type ChannelVideo ={
|
|||
export interface ChannelVideoEvents {
|
||||
action_toggle_expended: { expended: boolean },
|
||||
action_video_scroll: { direction: "left" | "right" },
|
||||
action_set_spotlight: { videoId: string | undefined },
|
||||
action_set_spotlight: { videoId: string | undefined, expend: boolean },
|
||||
|
||||
query_expended: {},
|
||||
query_videos: {},
|
||||
|
|
|
@ -159,7 +159,7 @@ const VideoContainer = React.memo((props: { videoId: string }) => {
|
|||
return (
|
||||
<div
|
||||
className={cssStyle.videoContainer}
|
||||
onDoubleClick={() => events.fire("action_set_spotlight", { videoId: props.videoId })}
|
||||
onDoubleClick={() => events.fire("action_set_spotlight", { videoId: props.videoId, expend: true })}
|
||||
onContextMenu={event => {
|
||||
event.preventDefault()
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue