1
0
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:
Gary Katsevman 2014-02-05 19:22:43 -05:00
parent 4b254a07df
commit a7d624affe
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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 = {