Improved experience on small screens
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
|
||||
// Default config
|
||||
var defaults = {
|
||||
enabled: true, // /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
|
||||
debug: false,
|
||||
seekInterval: 10,
|
||||
volume: 5,
|
||||
@ -866,6 +867,11 @@
|
||||
// Extend the default options with user specified
|
||||
config = extend(defaults, options);
|
||||
|
||||
// If enabled carry on
|
||||
if(!config.enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Setup the fullscreen api
|
||||
fullscreen = fullscreenApi();
|
||||
|
||||
@ -888,15 +894,6 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// If smartphone or tablet, stop customization as video (and captions in latest devices) are handled natively
|
||||
player.isSmartphoneOrTablet = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
|
||||
if (player.isSmartphoneOrTablet) {
|
||||
if(config.debug) {
|
||||
console.error("Browser not suppported.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set up aria-label for Play button with the title option
|
||||
if (typeof(config.title) === "undefined" || !config.title.length) {
|
||||
config.playAriaLabel = "Play";
|
||||
|
Reference in New Issue
Block a user