diff options
Diffstat (limited to 'assets/js/player.js')
| -rw-r--r-- | assets/js/player.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index 1c6e336c..16fd767b 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -73,6 +73,12 @@ if (location.pathname.startsWith('/embed/')) { }); } +// Detect mobile users and initalize mobileUi for better UX +// Detection code taken from https://stackoverflow.com/a/24600597 +if (/Mobi|Android/i.test(navigator.userAgent)) { + player.mobileUi(); +} + player.on('error', function (event) { if (player.error().code === 2 || player.error().code === 4) { setTimeout(function (event) { |
