Skip to content

Commit

Permalink
Merge pull request #13 from christopherjkim/streams
Browse files Browse the repository at this point in the history
Fixed stream embed code.
  • Loading branch information
Luke Curley committed Jan 26, 2012
2 parents bbd1c22 + 56e99e9 commit 22e560a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
14 changes: 7 additions & 7 deletions app/helpers/application_helper.rb
Expand Up @@ -154,22 +154,22 @@ def time_stamp(time, short = false)
end

def justintv_embed(stream)
'<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">
%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
<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)
'<object width="938" height="528">
<param name="movie" value="http://www.own3d.tv/livestream/<%= stream.identifier %>;autoplay=true" />
%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
<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
9 changes: 9 additions & 0 deletions lib/tasks/scheduler.rake
@@ -0,0 +1,9 @@
desc "This task is called by the Heroku scheduler add-on"
task :update_streams => :environment do
puts "Updating streams..."
@streams = Stream.all
@streams.each do |s|
s.update_status
end
puts "done."
end
6 changes: 0 additions & 6 deletions lib/tasks/stream.rake

This file was deleted.

0 comments on commit 22e560a

Please sign in to comment.