Skip to content

Commit

Permalink
fix(player): attach gesture event triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Oct 17, 2023
1 parent bbca26a commit eab1553
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vidstack/src/components/ui/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export class Gesture extends Component<GestureProps, {}, GestureEvents> {
const willTriggerEvent = new DOMEvent<string>('will-trigger', {
detail: action,
cancelable: true,
trigger,
});

this.dispatchEvent(willTriggerEvent);
Expand All @@ -168,7 +169,10 @@ export class Gesture extends Component<GestureProps, {}, GestureEvents> {
this._media.remote[kebabToCamelCase(method)](trigger);
}

this.dispatch('trigger', { detail: action as GestureAction });
this.dispatch('trigger', {
detail: action as GestureAction,
trigger,
});
}
}

Expand Down

0 comments on commit eab1553

Please sign in to comment.