Make vimeo workaround respect default quality option
This commit is contained in:
parent
03a188e8f2
commit
d16482b863
2 changed files with 27 additions and 4 deletions
|
|
@ -858,9 +858,32 @@ Callbacks = {
|
|||
} else {
|
||||
data.type = "rv";
|
||||
}
|
||||
// Right now only plays standard definition.
|
||||
// In the future, I may add a quality selector for mobile/standard/HD
|
||||
data.url = data.direct.sd.url;
|
||||
|
||||
/* Convert youtube-style quality key to vimeo workaround quality */
|
||||
var q = {
|
||||
small: "mobile",
|
||||
medium: "sd",
|
||||
large: "sd",
|
||||
hd720: "hd",
|
||||
hd1080:"hd",
|
||||
highres: "hd"
|
||||
}[USEROPTS.default_quality] || "sd";
|
||||
|
||||
var fallback = {
|
||||
hd: "sd",
|
||||
sd: "mobile",
|
||||
mobile: false
|
||||
};
|
||||
|
||||
while (!(q in data.direct) && q != false) {
|
||||
q = fallback[q];
|
||||
}
|
||||
|
||||
if (!q) {
|
||||
q = "sd";
|
||||
}
|
||||
|
||||
data.url = data.direct[q].url;
|
||||
}
|
||||
|
||||
if (data.type === "rt") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue