Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

-Added swfobject2.js to embedded javascript

  • Loading branch information...
commit d69df11951f3340a338b9a3e0109effc495499ec 1 parent ba7878a
Makoto Inoue authored
View
5 app/controllers/application.rb
@@ -25,4 +25,9 @@ def require_login
throw :halt, render('', :status => 401)
end
end
+
+
+ def swfobject2_link
+ "<script type=\"text/javascript\" charset=\"utf-8\" src= \"#{request.protocol}://#{request.host}/javascripts/swfobject2.js\"><\/script>"
+ end
end
View
5 app/views/videos/show_encoding.html.erb
@@ -38,5 +38,8 @@
<div class="embed_code">
<h4>Embed code</h4>
- <textarea cols="50" rows="6"><%= @video.embed_js %></textarea>
+ <textarea cols="50" rows="6">
+ <%= swfobject2_link %>
+ <%= @video.embed_js %>
+ </textarea>
</div>
View
6 app/views/videos/show_parent.html.erb
@@ -27,7 +27,6 @@
<dd><%= @video.duration_str %></dd>
</dl>
-
<% @video.encodings.each do |enc| %>
<h3><a href="/videos/<%= enc.key %>"><%= enc.profile_title %></a></h3>
@@ -40,9 +39,10 @@
<div class="response">Once uploaded and encoded the video will be displayed here.</div>
<% end %>
</div>
-
<div class="embed_code">
<h4>Embed code</h4>
- <textarea cols="50" rows="6"><%= enc.embed_js %></textarea>
+ <textarea cols="50" rows="6">
+ <%= swfobject2_link %>
+ <%= enc.embed_js %></textarea>
</div>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.