Hiki上で、Movieを表示させるPlugin
#movie.rb def movie(url, w, h, s) # Controler 描画領域を確保 h = h + 16 <<-EOS <embed src="#{url}" autoplay="true" loop="true" playeveryframe="true" controler="true" width="#{w}" height="#{h}" scale ="#{s}"> EOS end def attach_movie_anchor(file_name, width, height, s, page=@page) file_url = nil if @conf.options['attach.cache_url'] file_url = "#{@conf.options['attach.cache_url']}/#{page.escape.escape}/#{file_name.escape}" else file_url = %Q!#{@conf.cgi_name}#{cmdstr('plugin', "plugin=attach_download;p=#{page.escape};file_name=#{file_name.escape}")}! end movie(file_url, width, height, s) end export_plugin_methods(:movie, :attach_movie_anchor)
URL による呼び出しは以下の通り。url で movie file の位置を指定。width と height は movie を描画するサイズ。scale で縮尺率を決定。
自動的に movie を読み込んで繰り返し再生し、すべてのフレームを表示させ、movie の再生/停止などの制御するボタンを表示させる。
{{movie(url, width, height, scale)}}
添付ファイルによる呼び出しは以下の通り。
{{attach_movie_anchor(file_name, width, height, scale)}}