mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
Improve mobile ux with videojs-mobile-ui
This commit is contained in:
parent
8bc91ced4f
commit
53cdb04be7
4 changed files with 22 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue