Commit 464141c7 by Giulio Gratta

changing http:// to // on intro video urls to prevent browsers from blocking video embeds

parent 6b16ef0a
...@@ -173,7 +173,7 @@ class CourseDetails(object): ...@@ -173,7 +173,7 @@ class CourseDetails(object):
# the right thing # the right thing
result = None result = None
if video_key: if video_key:
result = '<iframe width="560" height="315" src="http://www.youtube.com/embed/' + \ result = '<iframe width="560" height="315" src="//www.youtube.com/embed/' + \
video_key + '?autoplay=1&rel=0" frameborder="0" allowfullscreen=""></iframe>' video_key + '?autoplay=1&rel=0" frameborder="0" allowfullscreen=""></iframe>'
return result return result
......
...@@ -75,7 +75,7 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({ ...@@ -75,7 +75,7 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({
return this.videosourceSample(); return this.videosourceSample();
}, },
videosourceSample : function() { videosourceSample : function() {
if (this.has('intro_video')) return "http://www.youtube.com/embed/" + this.get('intro_video'); if (this.has('intro_video')) return "//www.youtube.com/embed/" + this.get('intro_video');
else return ""; else return "";
} }
}); });
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
else: else:
youtube_video_id = "XNaiOGxWeto" youtube_video_id = "XNaiOGxWeto"
%> %>
<iframe width="640" height="360" src="http://www.youtube.com/embed/${youtube_video_id}?showinfo=0" frameborder="0" allowfullscreen></iframe> <iframe width="640" height="360" src="//www.youtube.com/embed/${youtube_video_id}?showinfo=0" frameborder="0" allowfullscreen></iframe>
</div> </div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment