Class: GrabzIt::VideoOptions
- Inherits:
-
BaseOptions
- Object
- BaseOptions
- GrabzIt::VideoOptions
- Defined in:
- lib/grabzit/videooptions.rb
Overview
Represents all of the options available when creating an video
Instance Method Summary collapse
-
#add_post_parameter(name, value) ⇒ Object
Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters.
-
#address ⇒ String
Get the URL to execute the HTML code in.
-
#address=(value) ⇒ void
Set the URL to execute the HTML code in.
-
#browserHeight ⇒ Integer
The height of the browser in pixels.
-
#browserHeight=(value) ⇒ void
Set the height of the browser in pixels.
-
#browserWidth ⇒ Integer
The width of the browser in pixels.
-
#browserWidth=(value) ⇒ void
Set the width of the browser in pixels.
-
#clickElement ⇒ String
Get the CSS selector of the HTML element in the web page that must clicked before the capture is performed.
-
#clickElement=(value) ⇒ void
Set the CSS selector of the HTML element in the web page that must clicked before the capture is performed.
-
#customWaterMarkId ⇒ String
The custom watermark id.
-
#customWaterMarkId=(value) ⇒ void
Set a custom watermark to add to the screenshot.
-
#duration ⇒ Integer
The length in seconds of the web page that should be converted into a video.
-
#duration=(value) ⇒ void
Set the length in seconds of the web page that should be converted into a video.
-
#framesPerSecond ⇒ Float
The number of frames per second that should be used to create the video.
-
#framesPerSecond=(value) ⇒ void
Set the number of frames per second that should be used to create the video.
-
#height ⇒ Integer
Get the height of the resulting video in pixels.
-
#height=(value) ⇒ void
Set the height of the resulting video in pixels.
-
#hoverElement ⇒ String
Get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed.
-
#hoverElement=(value) ⇒ void
Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed.
-
#initialize ⇒ VideoOptions
constructor
A new instance of VideoOptions.
-
#jsCode ⇒ String
Get the JavaScript code that will be execute in the web page before the capture is performed.
-
#jsCode=(value) ⇒ void
Set the JavaScript code that will be execute in the web page before the capture is performed.
-
#noAds ⇒ Boolean
Get if adverts should be automatically hidden.
-
#noAds=(value) ⇒ void
Set to true if adverts should be automatically hidden.
-
#noCookieNotifications ⇒ Boolean
Get if cookie notifications should be automatically hidden.
-
#noCookieNotifications=(value) ⇒ void
Set to true if cookie notifications should be automatically hidden.
-
#requestAs ⇒ Integer
Get which user agent type should be used.
-
#requestAs=(value) ⇒ void
Set which user agent type should be used: Standard Browser = 0, Mobile Browser = 1, Search Engine = 2 and Fallback Browser = 3.
-
#scrollElement ⇒ String
Get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed.
-
#scrollElement=(value) ⇒ void
Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed.
-
#start ⇒ Integer
The starting time of the web page that should be converted into a video.
-
#start=(value) ⇒ void
Set the starting time of the web page that should be converted into a video.
-
#waitForElement ⇒ String
Get the CSS selector of the HTML element in the web page that must be visible before the capture is performed.
-
#waitForElement=(value) ⇒ void
Set the CSS selector of the HTML element in the web page that must be visible before the capture is performed.
-
#width ⇒ Integer
Get the width of the resulting video in pixels.
-
#width=(value) ⇒ void
Set the width of the resulting video in pixels.
Methods inherited from BaseOptions
#country, #country=, #customId, #customId=, #encryptionKey, #encryptionKey=, #exportURL, #exportURL=, #proxy, #proxy=
Constructor Details
#initialize ⇒ VideoOptions
Returns a new instance of VideoOptions.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/grabzit/videooptions.rb', line 8 def initialize() super() @browserWidth = nil @browserHeight = nil @width = nil @height = nil @waitForElement = nil @requestAs = 0 @customWaterMarkId = nil @noAds = false @noCookieNotifications = false @address = nil @clickElement = nil @start = 0 @duration = 10 @framesPerSecond = 0 @jsCode = nil @scrollElement = nil @hoverElement = nil end |
Instance Method Details
#add_post_parameter(name, value) ⇒ Object
Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force GrabzIt to perform a HTTP post.
255 256 257 |
# File 'lib/grabzit/videooptions.rb', line 255 def add_post_parameter(name, value) @post = appendParameter(@post, name, value) end |
#address ⇒ String
Returns get the URL to execute the HTML code in.
186 187 188 |
# File 'lib/grabzit/videooptions.rb', line 186 def address @address end |
#address=(value) ⇒ void
This method returns an undefined value.
Set the URL to execute the HTML code in
194 195 196 |
# File 'lib/grabzit/videooptions.rb', line 194 def address=(value) @address = value end |
#browserHeight ⇒ Integer
Returns the height of the browser in pixels.
43 44 45 |
# File 'lib/grabzit/videooptions.rb', line 43 def browserHeight @browserHeight end |
#browserHeight=(value) ⇒ void
This method returns an undefined value.
Set the height of the browser in pixels. Use -1 to screenshot the whole web page
51 52 53 |
# File 'lib/grabzit/videooptions.rb', line 51 def browserHeight=(value) @browserHeight = value end |
#browserWidth ⇒ Integer
Returns the width of the browser in pixels.
30 31 32 |
# File 'lib/grabzit/videooptions.rb', line 30 def browserWidth @browserWidth end |
#browserWidth=(value) ⇒ void
This method returns an undefined value.
Set the width of the browser in pixels
38 39 40 |
# File 'lib/grabzit/videooptions.rb', line 38 def browserWidth=(value) @browserWidth = value end |
#clickElement ⇒ String
Returns get the CSS selector of the HTML element in the web page that must clicked before the capture is performed.
95 96 97 |
# File 'lib/grabzit/videooptions.rb', line 95 def clickElement @clickElement end |
#clickElement=(value) ⇒ void
This method returns an undefined value.
Set the CSS selector of the HTML element in the web page that must clicked before the capture is performed
103 104 105 |
# File 'lib/grabzit/videooptions.rb', line 103 def clickElement=(value) @clickElement = value end |
#customWaterMarkId ⇒ String
Returns the custom watermark id.
147 148 149 |
# File 'lib/grabzit/videooptions.rb', line 147 def customWaterMarkId @customWaterMarkId end |
#customWaterMarkId=(value) ⇒ void
This method returns an undefined value.
Set a custom watermark to add to the screenshot.
155 156 157 |
# File 'lib/grabzit/videooptions.rb', line 155 def customWaterMarkId=(value) @customWaterMarkId = value end |
#duration ⇒ Integer
Returns the length in seconds of the web page that should be converted into a video.
212 213 214 |
# File 'lib/grabzit/videooptions.rb', line 212 def duration @duration end |
#duration=(value) ⇒ void
This method returns an undefined value.
Set the length in seconds of the web page that should be converted into a video
220 221 222 |
# File 'lib/grabzit/videooptions.rb', line 220 def duration=(value) @duration = value end |
#framesPerSecond ⇒ Float
Returns the number of frames per second that should be used to create the video. From a minimum of 0.2 to a maximum of 10.
225 226 227 |
# File 'lib/grabzit/videooptions.rb', line 225 def framesPerSecond @framesPerSecond end |
#framesPerSecond=(value) ⇒ void
This method returns an undefined value.
Set the number of frames per second that should be used to create the video. From a minimum of 0.2 to a maximum of 10
233 234 235 |
# File 'lib/grabzit/videooptions.rb', line 233 def framesPerSecond=(value) @framesPerSecond = value end |
#height ⇒ Integer
Returns get the height of the resulting video in pixels.
69 70 71 |
# File 'lib/grabzit/videooptions.rb', line 69 def height @height end |
#height=(value) ⇒ void
This method returns an undefined value.
Set the height of the resulting video in pixels
77 78 79 |
# File 'lib/grabzit/videooptions.rb', line 77 def height=(value) @height = value end |
#hoverElement ⇒ String
Returns get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed.
121 122 123 |
# File 'lib/grabzit/videooptions.rb', line 121 def hoverElement @hoverElement end |
#hoverElement=(value) ⇒ void
This method returns an undefined value.
Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
129 130 131 |
# File 'lib/grabzit/videooptions.rb', line 129 def hoverElement=(value) @hoverElement = value end |
#jsCode ⇒ String
Returns get the JavaScript code that will be execute in the web page before the capture is performed.
238 239 240 |
# File 'lib/grabzit/videooptions.rb', line 238 def jsCode @jsCode end |
#jsCode=(value) ⇒ void
This method returns an undefined value.
Set the JavaScript code that will be execute in the web page before the capture is performed
246 247 248 |
# File 'lib/grabzit/videooptions.rb', line 246 def jsCode=(value) @jsCode = value end |
#noAds ⇒ Boolean
Returns get if adverts should be automatically hidden.
160 161 162 |
# File 'lib/grabzit/videooptions.rb', line 160 def noAds @noAds end |
#noAds=(value) ⇒ void
This method returns an undefined value.
Set to true if adverts should be automatically hidden
168 169 170 |
# File 'lib/grabzit/videooptions.rb', line 168 def noAds=(value) @noAds = value end |
#noCookieNotifications ⇒ Boolean
Returns get if cookie notifications should be automatically hidden.
173 174 175 |
# File 'lib/grabzit/videooptions.rb', line 173 def noCookieNotifications @noCookieNotifications end |
#noCookieNotifications=(value) ⇒ void
This method returns an undefined value.
Set to true if cookie notifications should be automatically hidden
181 182 183 |
# File 'lib/grabzit/videooptions.rb', line 181 def noCookieNotifications=(value) @noCookieNotifications = value end |
#requestAs ⇒ Integer
Returns get which user agent type should be used.
134 135 136 |
# File 'lib/grabzit/videooptions.rb', line 134 def requestAs @requestAs end |
#requestAs=(value) ⇒ void
This method returns an undefined value.
Set which user agent type should be used: Standard Browser = 0, Mobile Browser = 1, Search Engine = 2 and Fallback Browser = 3
142 143 144 |
# File 'lib/grabzit/videooptions.rb', line 142 def requestAs=(value) @requestAs = value end |
#scrollElement ⇒ String
Returns get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed.
108 109 110 |
# File 'lib/grabzit/videooptions.rb', line 108 def scrollElement @scrollElement end |
#scrollElement=(value) ⇒ void
This method returns an undefined value.
Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
116 117 118 |
# File 'lib/grabzit/videooptions.rb', line 116 def scrollElement=(value) @scrollElement = value end |
#start ⇒ Integer
Returns the starting time of the web page that should be converted into a video.
199 200 201 |
# File 'lib/grabzit/videooptions.rb', line 199 def start @start end |
#start=(value) ⇒ void
This method returns an undefined value.
Set the starting time of the web page that should be converted into a video
207 208 209 |
# File 'lib/grabzit/videooptions.rb', line 207 def start=(value) @start = value end |
#waitForElement ⇒ String
Returns get the CSS selector of the HTML element in the web page that must be visible before the capture is performed.
82 83 84 |
# File 'lib/grabzit/videooptions.rb', line 82 def waitForElement @waitForElement end |
#waitForElement=(value) ⇒ void
This method returns an undefined value.
Set the CSS selector of the HTML element in the web page that must be visible before the capture is performed
90 91 92 |
# File 'lib/grabzit/videooptions.rb', line 90 def waitForElement=(value) @waitForElement = value end |
#width ⇒ Integer
Returns get the width of the resulting video in pixels.
56 57 58 |
# File 'lib/grabzit/videooptions.rb', line 56 def width @width end |
#width=(value) ⇒ void
This method returns an undefined value.
Set the width of the resulting video in pixels
64 65 66 |
# File 'lib/grabzit/videooptions.rb', line 64 def width=(value) @width = value end |