Skip to content
Snippets Groups Projects
Commit 75a23135 authored by Gary Katsevman's avatar Gary Katsevman
Browse files

Report user activity on touchmove if userWasActive

parent 4d2267c1
Branches
Tags
No related merge requests found
......@@ -61,6 +61,8 @@ vjs.MediaTechController.prototype.initControlsListeners = function(){
};
vjs.MediaTechController.prototype.addControlsListeners = function(){
var userWasActive;
// Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do
// trigger mousedown/up.
// http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object
......@@ -81,10 +83,13 @@ vjs.MediaTechController.prototype.addControlsListeners = function(){
this.on('touchstart', function(event) {
// Stop the mouse events from also happening
event.preventDefault();
userWasActive = this.player_.userActive();
});
this.on('touchmove', function(event) {
if (userWasActive){
this.player().reportUserActivity();
}
});
// Turn on component tap events
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment