Selectively change playback type
![]() ![]() |
I was wondering if there was any way for the script to use a different playback type when playing playlists e.g. automatically switch to normal playback if a playlist is being used, but otherwise use the prevent autoplay function. |
![]() ![]() |
Edit Sept 08, 2009
// Allows autoplay if the playlist is active
if (/feature=PlayList/.test(location.href)) {
preventOnlyAutoplay = false;
videoToIcon = false;
}
// PUT THAT BEFORE THIS EXISTING CODE:
// Stops the video autoplay and autodownload by substituing the player with an icon or using the YouTube API
if (videoToIcon) {
var subsIcon; // subsIcon is declared here because it's used by both iconizeVideo and restoreVideo
iconizeVideo();
}
Or try the script I compiled some tweaks in: http://userscripts.org/scripts/show/57145 |
![]() ![]() |
Where would I put this if I use the prevent only autoplay function? |
![]() ![]() |
Edit Sept 05, 2009: This no longer works!
// Allows autoplay if the playlist is active
if (/feature=PlayList/.test(location.href)) {
preventOnlyAutoplay = false;
videoToIcon = false;
}
// EVERYTHING BELOW THIS IS EXISTING CODE
// Stops the video autoplay and autodownload by substituing the player with an icon or using the YouTube API
if (videoToIcon) {
var subsIcon; // subsIcon is declared here because it's used by both iconizeVideo and restoreVideo
iconizeVideo();
}
|

