Sha256: 9a3345ead487abd52a7fd6431516a0b974d33d771c5359eb2cca92279b8d445e

Contents?: true

Size: 921 Bytes

Versions: 12

Compression:

Stored size: 921 Bytes

Contents

class UserAgent
  module Browsers
    # The user agent utilized by ffmpeg or other projects utilizing libavformat
    class Libavformat < Base
      def self.extend?(agent)
        agent.detect do |useragent|
          useragent.product == "Lavf" || (useragent.product == "NSPlayer" && agent.version == "4.1.0.3856")
        end
      end

      # @return ["libavformat"] To make it easy to pick it out, all of the UAs that Lavf uses have this browser.
      def browser
        "libavformat"
      end

      # @return [nil, Version] If the product is NSPlayer, we don't have a version
      def version
        if detect_product("NSPlayer")
          nil
        else
          super
        end
      end

      # @return [nil] Lavf doesn't return us anything here
      def os
        nil
      end

      # @return [nil] Lavf doesn't return us anything here
      def platform
        nil
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
useragent-0.16.3 lib/user_agent/browsers/libavformat.rb
useragent-0.16.2 lib/user_agent/browsers/libavformat.rb
useragent-0.16.1 lib/user_agent/browsers/libavformat.rb
useragent-0.16.0 lib/user_agent/browsers/libavformat.rb
useragent-0.15.2 lib/user_agent/browsers/libavformat.rb
useragent-0.15.1 lib/user_agent/browsers/libavformat.rb
useragent-0.15.0 lib/user_agent/browsers/libavformat.rb
useragent-0.14.0 lib/user_agent/browsers/libavformat.rb
useragent-0.13.3 lib/user_agent/browsers/libavformat.rb
useragent-0.13.2 lib/user_agent/browsers/libavformat.rb
useragent-0.13.1 lib/user_agent/browsers/libavformat.rb
useragent-0.13.0 lib/user_agent/browsers/libavformat.rb