class Tubeclip::Model::Video::Format
Describes the various file formats in which a Youtube video may be made available and allows looking them up by format code number.
Constants
- FLASH
Flash format on YouTube site. All videos are available in this format.
- RTSP
RTSP
streaming URL for mobile video playback. H.263 video (176x144) and AMR audio.- SWF
HTTP URL to the embeddable player (
SWF
) for this video. This format is not available for a video that is not embeddable.- THREE_GPP
RTSP
streaming URL for mobile video playback. MPEG-4 SP video (up to 176x144) and AAC audio.
Attributes
format_code[R]
name[R]
Public Class Methods
by_code(format_code)
click to toggle source
Allows you to get the video format for a specific format code.
A full list of format codes is available at:
code.google.com/apis/youtube/reference.html#youtube_data_api_tag_media:content
Parameters¶ ↑
:format_code<Fixnum>:: The Youtube Format code of the object.
Returns¶ ↑
Tubeclip::Model::Video::Format: Video format object
# File lib/tubeclip/model/video.rb, line 42 def self.by_code(format_code) @@formats[format_code] end
new(format_code, name)
click to toggle source
Instantiates a new video format object.
Parameters¶ ↑
:format_code<Fixnum>:: The Youtube Format code of the object. :name<Symbol>:: The name of the format
Returns¶ ↑
Tubeclip::Model::Video::Format: Video format object
# File lib/tubeclip/model/video.rb, line 24 def initialize(format_code, name) @format_code = format_code @name = name @@formats[format_code] = self end