Class: AirVideo::Client::VideoObject
Overview
Represents a video file as listed by the AirVideo server.
Has helper functions like #url and #live_url which give the video playback URLs of this video, as produced by the originating AirVideo::Client instance’s AirVideo::Client.get_url method.
Instance Attribute Summary collapse
-
#audio_stream ⇒ Object
Returns the value of attribute audio_stream.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#streams ⇒ Object
readonly
Returns the value of attribute streams.
-
#video_stream ⇒ Object
Returns the value of attribute video_stream.
Instance Method Summary collapse
-
#initialize(server, name, location, detail = nil) ⇒ VideoObject
constructor
Shouldn’t be used outside of the AirVideo module.
- #inspect ⇒ Object
-
#live_url ⇒ Object
Gives the URL for live conversion video playback.
-
#url ⇒ Object
Gives the URL for direct video playback.
Constructor Details
#initialize(server, name, location, detail = nil) ⇒ VideoObject
Shouldn’t be used outside of the AirVideo module
224 225 226 227 228 229 230 231 232 233 |
# File 'lib/airvideo.rb', line 224 def initialize(server,name,location,detail = nil) # :nodoc: @server = server @name = name @location = "/"+location @details = detail # nil implies the details haven't been loaded # These are the defaults, all videos *should* have these. @video_stream = {'index' => 1} @audio_stream = {'index' => 0} details if !@details.nil? end |
Instance Attribute Details
#audio_stream ⇒ Object
Returns the value of attribute audio_stream.
221 222 223 |
# File 'lib/airvideo.rb', line 221 def audio_stream @audio_stream end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
220 221 222 |
# File 'lib/airvideo.rb', line 220 def details @details end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
220 221 222 |
# File 'lib/airvideo.rb', line 220 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
220 221 222 |
# File 'lib/airvideo.rb', line 220 def name @name end |
#streams ⇒ Object (readonly)
Returns the value of attribute streams.
220 221 222 |
# File 'lib/airvideo.rb', line 220 def streams @streams end |
#video_stream ⇒ Object
Returns the value of attribute video_stream.
221 222 223 |
# File 'lib/airvideo.rb', line 221 def video_stream @video_stream end |
Instance Method Details
#inspect ⇒ Object
285 286 287 |
# File 'lib/airvideo.rb', line 285 def inspect "<Video: #{name}>" end |
#live_url ⇒ Object
Gives the URL for live conversion video playback
281 282 283 |
# File 'lib/airvideo.rb', line 281 def live_url @server.get_url(self,true) end |
#url ⇒ Object
Gives the URL for direct video playback
276 277 278 |
# File 'lib/airvideo.rb', line 276 def url @server.get_url(self,false) end |