Improved experience on small screens

This commit is contained in:
Sam Potts
2015-02-15 15:15:28 +11:00
parent caeb63f197
commit 801ae4fc1a
4 changed files with 23 additions and 15 deletions

View File

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