File: ustream.rb

package info (click to toggle)
tdiary-contrib 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,772 kB
  • sloc: ruby: 17,305; javascript: 8,263; lisp: 562; xml: 451; php: 61; sql: 40; makefile: 18
file content (19 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# ustream.rb - insert some services of Ustream.tv
#
# Copyright (C) 2010, TADA Tadashi <t@tdtds.jp>.
# You can redistribute it and/or modify it under GPL2.
#

def ustream( id, type = :recorded )
	if type == :live then
		return ''
	end

	# insert recorded video
	if feed? then
		return %Q|<a href="http://www.ustream.tv/recorded/#{id}">Link to Ustream ##{id}</a></p><p>|
	end

	%Q|<iframe class="ustream" width="480" height="302" src="http://www.ustream.tv/embed/recorded/#{id}?v=3&amp;wmode=direct" scrolling="no" frameborder="0" style="border: 0px none transparent;"></iframe>|
end