Skip to content

Commit 42507f8

Browse files
darrennolangkatsev
authored andcommitted
fix: don't emit tap events on tech when using native controls (#3873)
If using nativeControlsForTouch, skip the emitTapEvents listeners from being setup. This avoids taps being taken away from native video elements and stopping controls being displayed.
1 parent e92db4f commit 42507f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/tech/tech.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ class Tech extends Component {
140140
this.initTextTrackListeners();
141141
this.initTrackListeners();
142142

143-
// Turn on component tap events
144-
this.emitTapEvents();
143+
// Turn on component tap events only if not using native controls
144+
if (!options.nativeControlsForTouch) {
145+
this.emitTapEvents();
146+
}
145147
}
146148

147149
/* Fallbacks for unsupported event types

0 commit comments

Comments
 (0)