Permalink
Browse files

quick workaround for new iframe embeds coming from youtube oembed

  • Loading branch information...
1 parent dd309c2 commit 199ff9937c5d3ecb77f5720632d35dfcdbf7447d @octatone committed Nov 17, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 js/tv.js
  2. +1 −0 js/tv.youtube.js
View
@@ -281,7 +281,7 @@ function loadChannel(channel, video_id) {
globals.videos[this_chan].video = []; //clear out stored videos
for(var x in data.data.children){
if(isVideo(data.data.children[x].data.domain) && (data.data.children[x].data.score > 1)){
- if(isEmpty(data.data.children[x].data.media_embed)){
+ if(isEmpty(data.data.children[x].data.media_embed) || data.data.children[x].data.domain == 'youtube.com' || data.data.children[x].data.domain == 'youtu.be'){
var created = createEmbed(data.data.children[x].data.url, data.data.children[x].data.domain);
if(created !== false){
data.data.children[x].data.media_embed.content = created.embed;
View
@@ -79,6 +79,7 @@ var youtube = {
embed = embed.replace(/version\=3/gi, js_str);
embed = embed.replace(/\<embed/i,'<embed id="ytplayer"');
+ embed = embed.replace(/\<iframe/i,'<iframe id="ytplayer"');
return embed;
}

0 comments on commit 199ff99

Please sign in to comment.