Describes the various file formats in which a Youtube video may be made available and allows looking them up by format code number.
Flash format on YouTube site. All videos are available in this format.
RTSP streaming URL for mobile video playback. H.263 video (176x144) and AMR audio.
HTTP URL to the embeddable player (SWF) for this video. This format is not available for a video that is not embeddable.
RTSP streaming URL for mobile video playback. MPEG-4 SP video (up to 176x144) and AAC audio.
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
:format_code<Fixnum>:: The Youtube Format code of the object.
YouTubeG::Model::Video::Format: Video format object
# File lib/youtube_g/model/video.rb, line 40 def self.by_code(format_code) @@formats[format_code] end
Instantiates a new video format object.
:format_code<Fixnum>:: The Youtube Format code of the object. :name<Symbol>:: The name of the format
YouTubeG::Model::Video::Format: Video format object
# File lib/youtube_g/model/video.rb, line 22 def initialize(format_code, name) @format_code = format_code @name = name @@formats[format_code] = self end