1
0
mirror of https://github.com/videojs/video.js.git synced 2025-04-11 11:42:08 +02:00

Dont enable onClick play state toggling on android via the MediaTechController

This commit is contained in:
Gary Katsevman 2013-04-29 17:54:21 -04:00
parent 8c52d02c21
commit a681d172f2

View File

@ -25,16 +25,25 @@ vjs.MediaTechController = vjs.Component.extend({
/**
* Handle a click on the media element. By default will play the media.
*
* On android browsers, having this toggle play state interferes with being
* able to toggle the controls and toggling play state with the play button
*/
vjs.MediaTechController.prototype.onClick = function(){
if (this.player_.controls()) {
if (this.player_.paused()) {
this.player_.play();
} else {
this.player_.pause();
vjs.MediaTechController.prototype.onClick = (function(){
if (vjs.IS_ANDROID) {
return function () {};
} else {
return function () {
if (this.player_.controls()) {
if (this.player_.paused()) {
this.player_.play();
} else {
this.player_.pause();
}
}
}
}
};
})();
vjs.MediaTechController.prototype.features = {
volumeControl: true,