Rather than going to the youtube website, this commit enables
the user to go to a full screen version of the video.
I am not sure if this is the right way of using the jquery script
with a colorbox plugin, but nevertheless, this is what it is.
Right now only works for youtube videos, need to do something similar for the soundcloud links too.
The convert_url_to_embed_url method in utils.py takes a url,
and converts the url into a embed url that you get when you use the
embed button on a youtube page. If it's a soundcloud url, the method
does nothing and returns the same url.
This method is then used in the Post class, to set the url of the
Post object.
Ideally, instead of the full screen video, we would like to have a
behavior where the video pops up and plays on the same page.
Rather than going to the youtube website, this commit enables the user to go to a full screen version of the video. I am not sure if this is the right way of using the jquery script with a colorbox plugin, but nevertheless, this is what it is.
Right now only works for youtube videos, need to do something similar for the soundcloud links too.
The
convert_url_to_embed_url
method in utils.py takes a url, and converts the url into a embed url that you get when you use the embed button on a youtube page. If it's a soundcloud url, the method does nothing and returns the same url.This method is then used in the
Post
class, to set the url of thePost
object.Ideally, instead of the full screen video, we would like to have a behavior where the video pops up and plays on the same page.