Skip to content

Commit

Permalink
Made the stream embed code mo' better
Browse files Browse the repository at this point in the history
  • Loading branch information
dy-dx committed Jan 26, 2012
1 parent 21c629c commit 732dac6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions app/helpers/application_helper.rb
Expand Up @@ -154,22 +154,22 @@ def time_stamp(time, short = false)
end

def justintv_embed(stream)
return "<object type=\"application/x-shockwave-flash\" height=\"528\" width=\"938\" data=\"http://www.twitch.tv/widgets/live_embed_player.swf?channel=#{stream.identifier}\" bgcolor=\"#000000\" id=\"live_embed_player_flash\" class=\"videoplayer\">
<param name=\"allowFullScreen\" value=\"true\" />
<param name=\"allowScriptAccess\" value=\"always\" />
<param name=\"allowNetworking\" value=\"all\" />
<param name=\"movie\" value=\"http://www.twitch.tv/widgets/live_embed_player.swf\" />
<param name=\"flashvars\" value=\"hostname=www.twitch.tv&channel=#{stream.identifier}&auto_play=true&start_volume=50\" />
</object>".html_safe
%Q{<object type="application/x-shockwave-flash" height="528" width="938" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=#{stream.identifier}" bgcolor="#000000" id="live_embed_player_flash" class="videoplayer">
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" />
<param name="flashvars" value="hostname=www.twitch.tv&channel=#{stream.identifier}&auto_play=true&start_volume=50" />
</object>}.html_safe
end

def own3dtv_embed(stream)
return "<object width=\"938\" height=\"528\">
<param name=\"movie\" value=\"http://www.own3d.tv/livestream/#{stream.identifier};autoplay=true\" />
<param name=\"allowscriptaccess\" value=\"always\" />
<param name=\"allowfullscreen\" value=\"true\" />
<param name=\"wmode\" value=\"transparent\" />
<embed src=\"http://www.own3d.tv/livestream/#{stream.identifier};autoplay=true\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"938\" height=\"528\" wmode=\"transparent\"></embed>
</object>".html_safe
%Q{<object width="938" height="528">
<param name="movie" value="http://www.own3d.tv/livestream/<%= stream.identifier %>;autoplay=true" />
<param name="allowscriptaccess" value="always" />
<param name="allowfullscreen" value="true" />
<param name="wmode" value="transparent" />
<embed src="http://www.own3d.tv/livestream/<%= stream.identifier %>;autoplay=true" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="938" height="528" wmode="transparent"></embed>
</object>}.html_safe
end
end

0 comments on commit 732dac6

Please sign in to comment.