mirror of
https://github.com/videojs/video.js.git
synced 2025-01-06 06:50:51 +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
|
// When the touch ends, measure how long it took and trigger the appropriate
|
||||||
// event
|
// event
|
||||||
this.on('touchend', function() {
|
this.on('touchend', function(event) {
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
|
||||||
// Proceed only if the touchmove/leave/cancel event didn't happen
|
// Proceed only if the touchmove/leave/cancel event didn't happen
|
||||||
if (couldBeTap === true) {
|
if (couldBeTap === true) {
|
||||||
// Measure how long the touch lasted
|
// Measure how long the touch lasted
|
||||||
|
@ -134,7 +134,10 @@ vjs.MediaTechController.prototype.onClick = function(event){
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
vjs.MediaTechController.prototype.onTap = function(){
|
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 = {
|
vjs.MediaTechController.prototype.features = {
|
||||||
|
Loading…
Reference in New Issue
Block a user