Commit f946b6eb authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Switch to new script for including vimeo videos.

Vimeo now provides an iframe.  The good part is that within this
they do their own Flash detection and say to you when you are
missing Adobe Flash.

Also less code, althogh it's an iframe.
parent b8f3e38a
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -16,14 +16,8 @@ module JsDuck
        @templates = {
          "html5" => '<video src="%u">%a</video>',
          "vimeo" => [
            '<p><object width="640" height="360">',
            '<param name="allowfullscreen" value="true" />',
            '<param name="allowscriptaccess" value="always" />',
            '<param name="flashvars" value="api=1" />',
            '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=%u&amp;server=vimeo.com&amp;color=4CC208&amp;fullscreen=1" />',
            '<embed src="http://vimeo.com/moogaloop.swf?clip_id=%u&amp;server=vimeo.com&amp;color=4CC208&amp;fullscreen=1" ',
            'type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed>',
            '</object></p>',
            '<p><iframe src="http://player.vimeo.com/video/%u" width="640" height="360" frameborder="0" ',
                'webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>'
          ].join
        }

+2 −8
Original line number Diff line number Diff line
@@ -33,14 +33,8 @@ Ext.define('Docs.view.videos.Container', {
        this.video = video;

        this.tpl = this.tpl || new Ext.XTemplate(
            '<object width="640" height="360" id="video_player">',
                '<param name="allowfullscreen" value="true" />',
                '<param name="allowscriptaccess" value="always" />',
                '<param name="flashvars" value="api=1" />',
                '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={id}&amp;server=vimeo.com&amp;color=4CC208&amp;fullscreen=1" />',
                '<embed src="http://vimeo.com/moogaloop.swf?clip_id={id}&amp;server=vimeo.com&amp;color=4CC208&amp;fullscreen=1" ',
                    'type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed>',
            '</object>',
            '<iframe src="http://player.vimeo.com/video/{id}" width="640" height="360" frameborder="0" ',
                'webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>',
            '<h1>{title}</h1>',
            '<p>{[this.linkify(values.description)]}</p>',
            {