noosfero | Added video type and url formatted to video plugin (!1207)

Leandro Nunes gitlab at mg.gitlab.com
Mon May 8 16:15:27 BRT 2017


Leandro Nunes started a new discussion on plugins/video/lib/video_plugin/video_block.rb:

>    def api_content(params = {})
>      content = {:url => self.url}
>      content[:mime_type] = VideoPlugin::Video.mime_type(self.url) if VideoPlugin::Video.is_video_file?(self.url)
> +    if is_youtube?
> +      content[:video_type] = 'youtube' 
> +      content[:url_formatted] = format_embed_video_url_for_youtube
> +    end
> +    if is_vimeo?
> +      content[:video_type] = "vimeo"
> +      content[:url_formatted] = format_embed_video_url_for_vimeo
> +    end
> +    if is_video_file?
> +      content[:video_type] = "video"
> +      content[:url_formatted] = self.url

Make test for this situation

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1207#note_29064529
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170508/b84d92c6/attachment.html>


More information about the Noosfero-dev mailing list