Sha256: 534a532057e3556b8f727c009238983cdef18859bc55e241449ca6f906926a46

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

require 'actv/asset'

module ACTV
  class Video < Asset
    attr_reader :sorCreateDtm, :urlAdr
    alias publish_date sorCreateDtm
    alias source urlAdr
    alias channel sub_topic

    def self.valid? response
      ACTV::VideoValidator.new(response).valid?
    end

    def keywords
      @keywords ||= tag_by_description 'keywords'
    end

    def duration
      @duration ||= tag_by_description 'duration'
    end

    def height
      @height ||= tag_by_description 'height'
    end

    def type
      @type ||= tag_by_description 'type'
    end

    def width
      @width ||= tag_by_description 'width'
    end

    def filesize
      @filesize ||= tag_by_description 'filesize'
    end

    def bitrate
      @bitrate ||= tag_by_description 'bitrate'
    end

    def canonicalUrl
      @canonical_url ||= tag_by_description 'canonicalUrl'
    end

    alias canonical_url canonicalUrl

    def image
      @image ||= image_by_name 'videoImage'
    end

    alias thumbnail image

    def cover
      image.url if image
    end

    def is_video?
      true
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
actv-2.10.5 lib/actv/video.rb
actv-2.10.4 lib/actv/video.rb
actv-2.10.3 lib/actv/video.rb
actv-2.10.2 lib/actv/video.rb
actv-2.10.1 lib/actv/video.rb