2
# youtube.rb: YouTube plugin for tDiary
4
# Copyright (C) 2007 by TADA Tadashi <sho@spc.gr.jp>
6
# usage: <%= youtube 'VIDEO_ID' %>
8
def youtube( video_id )
9
if @conf.mobile_agent? then
10
%Q|<div class="youtube"><a href="http://www.youtube.com/watch?v=#{video_id}">YouTube (#{video_id})</a></div>|
11
elsif defined?( :iphone? ) and iphone?
12
%Q|<div class="youtube"><a href="youtube:#{video_id}">YouTube (#{video_id})</a></div>|
15
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/#{video_id}"></param><embed src="http://www.youtube.com/v/#{video_id}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>