Class: GrabzIt::VideoOptions

Inherits:
BaseOptions show all
Defined in:
lib/grabzit/videooptions.rb

Overview

Represents all of the options available when creating an video

Author:

  • GrabzIt

Version:

  • 3.0

Instance Method Summary collapse

Methods inherited from BaseOptions

#country, #country=, #customId, #customId=, #encryptionKey, #encryptionKey=, #exportURL, #exportURL=, #proxy, #proxy=

Constructor Details

#initializeVideoOptions

Returns a new instance of VideoOptions.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/grabzit/videooptions.rb', line 8

def initialize()
	super()
	@browserWidth = nil
	@browserHeight = nil
	@waitForElement = nil
	@requestAs = 0
	@customWaterMarkId = nil
	@noAds = false
	@noCookieNotifications = false
	@address = nil
	@clickElement = nil
	@start = 0
	@duration = 10
	@framesPerSecond = 0
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.

Parameters:

  • name (String)

    the name of the HTTP Post parameter

  • value (String)

    the value of the HTTP Post parameter



185
186
187
# File 'lib/grabzit/videooptions.rb', line 185

def add_post_parameter(name, value)
	@post = appendParameter(@post, name, value)
end

#addressString

Returns get the URL to execute the HTML code in.

Returns:

  • (String)

    get the URL to execute the HTML code in



129
130
131
# File 'lib/grabzit/videooptions.rb', line 129

def address
	@address
end

#address=(value) ⇒ void

This method returns an undefined value.

Set the URL to execute the HTML code in

Parameters:

  • value (String)

    the address



137
138
139
# File 'lib/grabzit/videooptions.rb', line 137

def address=(value)
	@address = value
end

#browserHeightInteger

Returns the height of the browser in pixels.

Returns:

  • (Integer)

    the height of the browser in pixels



38
39
40
# File 'lib/grabzit/videooptions.rb', line 38

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

Parameters:

  • value (Integer)

    the browser height



46
47
48
# File 'lib/grabzit/videooptions.rb', line 46

def browserHeight=(value)
	@browserHeight = value
end

#browserWidthInteger

Returns the width of the browser in pixels.

Returns:

  • (Integer)

    the width of the browser in pixels



25
26
27
# File 'lib/grabzit/videooptions.rb', line 25

def browserWidth
	@browserWidth
end

#browserWidth=(value) ⇒ void

This method returns an undefined value.

Set the width of the browser in pixels

Parameters:

  • value (Integer)

    the browser width



33
34
35
# File 'lib/grabzit/videooptions.rb', line 33

def browserWidth=(value)
	@browserWidth = value
end

#clickElementString

Returns get the CSS selector of the HTML element in the web page that must clicked before the capture is performed.

Returns:

  • (String)

    get the CSS selector of the HTML element in the web page that must clicked before the capture is performed



64
65
66
# File 'lib/grabzit/videooptions.rb', line 64

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

Parameters:

  • value (String)

    the element to click



72
73
74
# File 'lib/grabzit/videooptions.rb', line 72

def clickElement=(value)
	@clickElement = value
end

#customWaterMarkIdString

Returns the custom watermark id.

Returns:

  • (String)

    the custom watermark id.



90
91
92
# File 'lib/grabzit/videooptions.rb', line 90

def customWaterMarkId
	@customWaterMarkId
end

#customWaterMarkId=(value) ⇒ void

This method returns an undefined value.

Set a custom watermark to add to the screenshot.

Parameters:

  • value (String)

    custom watermark id



98
99
100
# File 'lib/grabzit/videooptions.rb', line 98

def customWaterMarkId=(value)
	@customWaterMarkId = value
end

#durationInteger

Returns the length in seconds of the web page that should be converted into a video.

Returns:

  • (Integer)

    the length in seconds of the web page that should be converted into a video



155
156
157
# File 'lib/grabzit/videooptions.rb', line 155

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

Parameters:

  • value (Integer)

    the number of seconds



163
164
165
# File 'lib/grabzit/videooptions.rb', line 163

def duration=(value)
	@duration = value
end

#framesPerSecondFloat

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.

Returns:

  • (Float)

    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



168
169
170
# File 'lib/grabzit/videooptions.rb', line 168

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

Parameters:

  • value (Float)

    the number of frames per second



176
177
178
# File 'lib/grabzit/videooptions.rb', line 176

def framesPerSecond=(value)
	@framesPerSecond = value
end

#noAdsBoolean

Returns get if adverts should be automatically hidden.

Returns:

  • (Boolean)

    get if adverts should be automatically hidden



103
104
105
# File 'lib/grabzit/videooptions.rb', line 103

def noAds
	@noAds
end

#noAds=(value) ⇒ void

This method returns an undefined value.

Set to true if adverts should be automatically hidden

Parameters:

  • value (Boolean)

    hide adverts



111
112
113
# File 'lib/grabzit/videooptions.rb', line 111

def noAds=(value)
	@noAds = value
end

#noCookieNotificationsBoolean

Returns get if cookie notifications should be automatically hidden.

Returns:

  • (Boolean)

    get if cookie notifications should be automatically hidden



116
117
118
# File 'lib/grabzit/videooptions.rb', line 116

def noCookieNotifications
	@noCookieNotifications
end

#noCookieNotifications=(value) ⇒ void

This method returns an undefined value.

Set to true if cookie notifications should be automatically hidden

Parameters:

  • value (Boolean)

    hide cookie notifications



124
125
126
# File 'lib/grabzit/videooptions.rb', line 124

def noCookieNotifications=(value)
	@noCookieNotifications = value
end

#requestAsInteger

Returns get which user agent type should be used.

Returns:

  • (Integer)

    get which user agent type should be used



77
78
79
# File 'lib/grabzit/videooptions.rb', line 77

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

Parameters:

  • value (Integer)

    the browser type



85
86
87
# File 'lib/grabzit/videooptions.rb', line 85

def requestAs=(value)
	@requestAs = value
end

#startInteger

Returns the starting time of the web page that should be converted into a video.

Returns:

  • (Integer)

    the starting time of the web page that should be converted into a video



142
143
144
# File 'lib/grabzit/videooptions.rb', line 142

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

Parameters:

  • value (Integer)

    the second to start at



150
151
152
# File 'lib/grabzit/videooptions.rb', line 150

def start=(value)
	@start = value
end

#waitForElementString

Returns get the CSS selector of the HTML element in the web page that must be visible before the capture is performed.

Returns:

  • (String)

    get the CSS selector of the HTML element in the web page that must be visible before the capture is performed



51
52
53
# File 'lib/grabzit/videooptions.rb', line 51

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

Parameters:

  • value (String)

    the element to wait for



59
60
61
# File 'lib/grabzit/videooptions.rb', line 59

def waitForElement=(value)
	@waitForElement = value
end