Skip to content

Commit

Permalink
force min object and embed of 640x480
Browse files Browse the repository at this point in the history
  • Loading branch information
octatone committed Oct 27, 2011
1 parent 7339f89 commit ec970b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/tv.js
Expand Up @@ -427,6 +427,7 @@ function loadVideo(video) {
$video_embed.addClass('loading');
var embed = $.unescapifyHTML(globals.videos[this_chan].video[selected_video].media_embed.content);
embed = prepEmbed(embed, globals.videos[this_chan].video[selected_video].media.type);
embed = prepEmbed(embed, 'size');

var redditlink = 'http://reddit.com'+$.unescapifyHTML(globals.videos[this_chan].video[selected_video].permalink);
$('#video-title').html('<a href="' + redditlink + '" target="_blank"'
Expand Down Expand Up @@ -665,7 +666,12 @@ function prepEmbed(embed, type){
return youtube.prepEmbed(embed);
case 'vimeo.com':
return vimeo.prepEmbed(embed);
case 'size':
embed = embed.replace(/height\="(\d\w+)"/gi, 'height="480"');
embed = embed.replace(/width\="(\d\w+)"/gi, 'width="640"');
return embed;
}

}

function addListeners(type){
Expand Down

0 comments on commit ec970b5

Please sign in to comment.