mirror of
https://github.com/videojs/video.js.git
synced 2025-01-04 06:48:49 +02:00
stop immediate propagation on tap events
Make media tech controller only hide control bar.
This commit is contained in:
parent
4b254a07df
commit
a7d624affe
@ -868,7 +868,9 @@ vjs.Component.prototype.emitTapEvents = function(){
|
||||
|
||||
// When the touch ends, measure how long it took and trigger the appropriate
|
||||
// event
|
||||
this.on('touchend', function() {
|
||||
this.on('touchend', function(event) {
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
// Proceed only if the touchmove/leave/cancel event didn't happen
|
||||
if (couldBeTap === true) {
|
||||
// Measure how long the touch lasted
|
||||
|
@ -134,7 +134,10 @@ vjs.MediaTechController.prototype.onClick = function(event){
|
||||
*/
|
||||
|
||||
vjs.MediaTechController.prototype.onTap = function(){
|
||||
this.player().userActive(!this.player().userActive());
|
||||
var userActivity = this.player().userActive();
|
||||
if (userActivity) {
|
||||
this.player().userActive(!userActivity);
|
||||
}
|
||||
};
|
||||
|
||||
vjs.MediaTechController.prototype.features = {
|
||||
|
Loading…
Reference in New Issue
Block a user