Class: UserAgent::Browsers::Libavformat
- 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
-
#browser ⇒ "libavformat"
To make it easy to pick it out, all of the UAs that Lavf uses have this browser.
-
#os ⇒ nil
Lavf doesn’t return us anything here.
-
#platform ⇒ nil
Lavf doesn’t return us anything here.
-
#version ⇒ nil, Version
If the product is NSPlayer, we don’t have a version.
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
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.
12 13 14 |
# File 'lib/user_agent/browsers/libavformat.rb', line 12 def browser "libavformat" end |
#os ⇒ nil
Returns Lavf doesn’t return us anything here.
22 23 24 |
# File 'lib/user_agent/browsers/libavformat.rb', line 22 def os nil end |
#platform ⇒ nil
Returns Lavf doesn’t return us anything here.
27 28 29 |
# File 'lib/user_agent/browsers/libavformat.rb', line 27 def platform nil end |
#version ⇒ nil, Version
Returns 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 |