./lib/animoto/resources/video.rb in animoto-1.3.1 vs ./lib/animoto/resources/video.rb in animoto-1.5.0

- old
+ new

@@ -16,10 +16,11 @@ params = unpack_rendering_parameters(body) super.merge({ :download_url => links['file'], :storyboard_url => links['storyboard'], :cover_image_url => links['cover_image'], + :stream_url => links['stream'], :format => params['format'], :framerate => params['framerate'], :resolution => params['resolution'] }) end @@ -34,14 +35,18 @@ # The Storyboard object this video was rendered from. # @return [Resources::Storyboard] attr_reader :storyboard - # In available, the URL to the cover image file. + # If available, the URL to the cover image file. # @return [String] attr_reader :cover_image_url + # If available, the URL where this video can be watched via HTTP Live Streaming. + # @return [String] + attr_reader :stream_url + # The format of the video. # @return [String] attr_reader :format # The framerate of the video. @@ -55,24 +60,26 @@ # Sets the attributes on a new video. # # @param [Hash{Symbol=>Object}] attributes # @option attributes [String] :download_url the URL where this video can be downloaded # @option attributes [String] :storyboard_url the URL for this video's storyboard + # @option attributes [String] :stream_url the URL for this video's HTTP Live Streaming playlist # @option attributes [String] :format the format of this video # @option attributes [Integer] :framerate the framerate of this video # @option attributes [String] :resolution the vertical resolution of this video # @return [Resources::Video] the video # @see Animoto::Resources::Base#instantiate def instantiate attributes = {} @download_url = attributes[:download_url] @storyboard_url = attributes[:storyboard_url] @storyboard = Animoto::Resources::Storyboard.new(:url => @storyboard_url) if @storyboard_url @cover_image_url = attributes[:cover_image_url] + @stream_url = attributes[:stream_url] @format = attributes[:format] @framerate = attributes[:framerate] @resolution = attributes[:resolution] super end end end -end \ No newline at end of file +end