-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Youtube video (previously 144p, 240p, 360p to 240p, 360p, 480p)
- Loading branch information
vico - low web
committed
Feb 3, 2020
1 parent
571956b
commit 15ff98f
Showing
6 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// TODO generate youtube script (Youtube-small.js,Youtube-medium.js,Youtube-large.js) from common source | ||
(function() { | ||
function setQuality() { | ||
let player = document.getElementById('movie_player') || document.querySelector('.ytp-embed'); | ||
if (player && typeof player.setPlaybackQualityRange === 'function') { | ||
player.setPlaybackQualityRange('large'); | ||
} | ||
} | ||
document.body.addEventListener('yt-navigate-finish', event => { | ||
setQuality(); | ||
}); | ||
setQuality(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters