Large

ViewTube

By sebaro Last update May 21, 2013 — Installed 110,892 times.

Set default Video Quality (including fallback)

in
Subscribe to Set default Video Quality (including fallback) 5 posts, 3 voices



hennegwath User
FirefoxX11

Hi,

It would be fine if one could alter the default quality of videos played. If I set the variable gVdoDefault to "High Definition MP4" it works fine, but there's no fallback if there is no video of that type.
Maybe you could include a test if the video is accessable and else load the next best quality available.

Keep on,
Henne

 
sebaro Script's Author
OperaX11

Hi,
All I can do is to add a video definition user option and if that video doesn't exists to fallback to the default one. Loading the next best quality means many lines of code when the videos menu can do that in just two clicks.

 
sebaro Script's Author
OperaX11

For now, for YouTube you can replace:
gVdoDefault = 'LD MP4';
with
if (gVdoList['HD MP4'] != null) gVdoDefault = 'HD MP4';
else if (gVdoList['HD WebM'] != null) gVdoDefault = 'HD WebM';
else if (gVdoList['SD MP4'] != null) gVdoDefault = 'SD MP4';
else if (gVdoList['SD WebM'] != null) gVdoDefault = 'SD WebM';
else gVdoDefault = 'LD MP4';

 
614ckho13 User
ChromeX11

I did it like this:

if (gVdoList['Full High Definition MP4'] != null) gVdoDefault = 'Full High Definition MP4';
else if (gVdoList['High Definition WebM'] != null) gVdoDefault = 'High Definition WebM';
else if (gVdoList['High Definition MP4'] != null) gVdoDefault = 'High Definition MP4';
else if (gVdoList['Standard Definition WebM'] != null) gVdoDefault = 'Standard Definition WebM';
else if (gVdoList['Standard Definition MP4'] != null) gVdoDefault = 'Standard Definition MP4';
else if (gVdoList['Low Definition WebM'] != null) gVdoDefault = 'Low Definition WebM';
else if (gVdoList['Low Definition MP4'] != null) gVdoDefault = 'Low Definition MP4';
else gVdoDefault = 'Very Low Definition FLV';

Thanks :)

 
sebaro Script's Author
OperaX11

I'll add soon a new feature/button to choose the video definition HD for FHD/HD, SD for SD and LD/VLD.