Class: UserAgent::Browsers::Libavformat

Inherits:
Base
  • Object
show all
Defined in:
lib/user_agent/browsers/libavformat.rb

Overview

The user agent utilized by ffmpeg or other projects utilizing libavformat

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#<=>, #application, #bot?, #eql?, #method_missing, #mobile?, #respond_to?, #to_h, #to_s, #to_str

Methods included from Comparable

#<, #<=, #==, #>, #>=

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class UserAgent::Browsers::Base

Class Method Details

.extend?(agent) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/user_agent/browsers/libavformat.rb', line 5

def self.extend?(agent)
  agent.detect do |useragent|
    useragent.product == "Lavf" || (useragent.product == "NSPlayer" && agent.version == "4.1.0.3856")
  end
end

Instance Method Details

#browser"libavformat"

Returns To make it easy to pick it out, all of the UAs that Lavf uses have this browser.

Returns:

  • ("libavformat")

    To make it easy to pick it out, all of the UAs that Lavf uses have this browser.



12
13
14
# File 'lib/user_agent/browsers/libavformat.rb', line 12

def browser
  "libavformat"
end

#osnil

Returns Lavf doesn’t return us anything here.

Returns:

  • (nil)

    Lavf doesn’t return us anything here



22
23
24
# File 'lib/user_agent/browsers/libavformat.rb', line 22

def os
  nil
end

#platformnil

Returns Lavf doesn’t return us anything here.

Returns:

  • (nil)

    Lavf doesn’t return us anything here



27
28
29
# File 'lib/user_agent/browsers/libavformat.rb', line 27

def platform
  nil
end

#versionnil, Version

Returns If the product is NSPlayer, we don’t have a version.

Returns:

  • (nil, Version)

    If the product is NSPlayer, we don’t have a version



17
18
19
# File 'lib/user_agent/browsers/libavformat.rb', line 17

def version
  super unless detect_product("NSPlayer")
end