2012/03/08

collective.flowplayer with custom flash link

Plone 裡使用 collective.flowplayer 來嵌入影片,如果檔案放在 dropbox 之類的空間,可以試用下列的方式,先在 Page 裡編輯下列的 HTML 內容:

<object data="http://mysite.com/++resource++collective.flowplayer/flowplayer.swf"
 height="214" type="application/x-shockwave-flash" width="280">
<param name="data"
 value="http://mysite.com/++resource++collective.flowplayer/flowplayer.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="config=http://mysite.com/my-folder/config.js" />
<param name="src"
 value="http://mysite.com/++resource++collective.flowplayer/flowplayer.swf" />
</object>

然後到 ZMI 的 my-folder 目錄裡,建立 config.js 檔案,內容如下:

{'clip':
 {'scaling':'fit',
  'autoBuffering':true,
  'autoPlay':true,
  'baseUrl':'http://dl.dropbox.com',
  'url':'http://dl.dropbox.com/u/myid/myfile.flv'
 },
 'canvas':{'backgroundColor':'#112233'},
 'plugins':
  {'controls':
   {'time':true,
    'volume':true,
    'fullscreen':true
   },
  'content':
   {'url':'flowplayer.swf',
    'html':'Flash plugins work too'}
  }
}

No comments: