Browse Source

Fix for some YouTube URL constructs breaking

pull/23/merge
Zach Wise 13 years ago
parent
commit
b0dd0ccee3
  1. 2
      locale/de.js
  2. 2
      locale/en.js
  3. 2
      locale/es.js
  4. 2
      locale/fr.js
  5. 2
      locale/it.js
  6. 2
      locale/kr.js
  7. 2
      locale/nl.js
  8. 2
      locale/pt-br.js
  9. 2
      locale/zh-ch.js
  10. 2
      locale/zh-tw.js
  11. 7
      source/js/VMM.js
  12. 2
      timeline-min.js
  13. 7
      timeline.js

2
locale/de.js

File diff suppressed because one or more lines are too long

2
locale/en.js

File diff suppressed because one or more lines are too long

2
locale/es.js

File diff suppressed because one or more lines are too long

2
locale/fr.js

File diff suppressed because one or more lines are too long

2
locale/it.js

File diff suppressed because one or more lines are too long

2
locale/kr.js

File diff suppressed because one or more lines are too long

2
locale/nl.js

File diff suppressed because one or more lines are too long

2
locale/pt-br.js

File diff suppressed because one or more lines are too long

2
locale/zh-ch.js

File diff suppressed because one or more lines are too long

2
locale/zh-tw.js

File diff suppressed because one or more lines are too long

7
source/js/VMM.js

@ -1403,12 +1403,15 @@ if (typeof VMM == 'undefined') {
media.id = d; media.id = d;
success = true; success = true;
} else if (d.match('(www.)?youtube|youtu\.be')) { } else if (d.match('(www.)?youtube|youtu\.be')) {
if (d.match('embed')) { if (d.match('v=')) {
youtube_id = d.split(/embed\//)[1].split('"')[0]; youtube_id = VMM.Util.getUrlVars(d)["v"];
//youtube_id = d.split(/embed\//)[1].split('"')[0];
} else { } else {
youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]; youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];
} }
//youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]; //youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];
// http://www.youtube.com/watch?feature=player_embedded&v=0l-ivcnLrSc
//http://www.youtube.com/watch?v=0l-ivcnLrSc
media.type = "youtube"; media.type = "youtube";
media.id = youtube_id; media.id = youtube_id;
success = true; success = true;

2
timeline-min.js vendored

File diff suppressed because one or more lines are too long

7
timeline.js

@ -1403,12 +1403,15 @@ if (typeof VMM == 'undefined') {
media.id = d; media.id = d;
success = true; success = true;
} else if (d.match('(www.)?youtube|youtu\.be')) { } else if (d.match('(www.)?youtube|youtu\.be')) {
if (d.match('embed')) { if (d.match('v=')) {
youtube_id = d.split(/embed\//)[1].split('"')[0]; youtube_id = VMM.Util.getUrlVars(d)["v"];
//youtube_id = d.split(/embed\//)[1].split('"')[0];
} else { } else {
youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]; youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];
} }
//youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]; //youtube_id = d.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];
// http://www.youtube.com/watch?feature=player_embedded&v=0l-ivcnLrSc
//http://www.youtube.com/watch?v=0l-ivcnLrSc
media.type = "youtube"; media.type = "youtube";
media.id = youtube_id; media.id = youtube_id;
success = true; success = true;

Loading…
Cancel
Save