Method: setLogLevel Set the logLevel of a FreeWheel HTML5 SDK. By default the logLevel is tv.freewheel.SDK.LOG_LEVEL_INFO
(Number)
must be one of:
tv.freewheel.SDK.setLogLevel(tv.freewheel.SDK.LOG_LEVEL_DEBUG);
Method: disableConsentAutoRetrieval Disables execution of consent protocol (USP, TCF, GPP) logic. This method must be called before instantiating AdManager for it to take effect.
tv.freewheel.SDK.disableConsentAutoRetrieval();
Class: AdManager
Namespace: tv.freewheel.SDK
var theAdManager = new tv.freewheel.SDK.AdManager();
Method: setServer Set the ad server URL provided by FreeWheel. REQUIRED. Consult your FreeWheel sales engineer for the value.
(String)
Ad server url. You can use a url to a .js file for testing purposes.
var theAdManager = new tv.freewheel.SDK.AdManager();
theAdManager.setServer("response.js");
theAdManager.setServer("http://g1.v.fwmrm.net/ad/g/1");
Method: setLocation Set the current geographic location of the device. This value will only be used for geo targeting purposes. This will set the ltlg parameter in the ad request.
(Position)
Device's current geographic location. See:
http://dev.w3.org/geo/api/spec-source.html#position_interface
Method: getOMSDKLibraryVersion Get the version of the integrated OMSDK.
Return: OMSDK version string (e.g. 1.3.34).
Method: getOMSDKPartnerVersion Get the AdManager version string that is submitted to OMSDK.
Return: OMSDK partner version string.
Method: newContext Construct a new tv.freewheel.SDK.Context instance. A Context instance is used to set ad request information for a particular ad or ad set. Multiple contexts can be created throughout the lifecycle of the FreeWheel AdManager and may exist simultaneously without consequence.
Return: A new tv.freewheel.SDK.Context instance.
See also: Context
Method: newContextWithContext Construct a new tv.freewheel.SDK.Context instance from the given Context instance. The new context copies internal state of the original one for submitting new ad request. Following methods DO NOT NEED to call again on the new context:
addRenderer
setRequestMode
setCapability
setVisitor
setSiteSection
setVideoAsset
setVideoAssetCurrentTimePosition
setProfile
startSubsession
setContentVideoElement
setVideoDisplayCompatibleSizes
setVideoState
loadExtension
But the method below is REQUIRED to be called again on the new context:
submitRequest
(Context)
Original context to be copied.
Return: A new tv.freewheel.SDK.Context instance.
See also: Context
Method: enableTopics Enables AdManager to call the document.browsingTopics() API when supported by the browser. If it is available and topics are returned, the version and topic value of each returned topic will be added to the ad request using the key, "_fwu_topic".
This method should be called immediately after instantiating AdManager.
If this method is called, and the "_fwu_topic" value is manually set, the manually set value will be used in the ad request.
Note that this is still an experimental feature. More info on this can be found at the "AdManager Support for Google Privacy Sandbox Topics API" Hub page:
https://hub.freewheel.tv/x/OwKNkg
Method: dispose Disposes the AdManager instance, and the TopicsManager and ConsentManager objects used by AdManager. This should only be called once the player will not be sending any more ad requests or playing back any ads. NOTE: This method should not be invoked synchronously in the handler of any AdManager posted event.
Calling AdManager dispose will not dispose the associated Context object, please call Context.dispose to dispose the Context.
Class: Context An Context instance represents context of an ad request, which is capable of making ad request, parsing response and rendering ads.
Namespace: tv.freewheel.SDK
Method: addRenderer Add a renderer with loading URL and match conditions.
(String)
The URL to load renderer.
(String)
Base unit of ads that the renderer supports. If not set, it should be null.
(String)
Content types or wrapper types of ads that the renderer supports. If not set, it should be null.
(String)
Slot types that the renderer supports. If not set, it should be null.
(String)
Ad units that the renderer supports. If not set, it should be null.
(String)
Creative APIs that the renderer supports. If not set, it should be null.
(Object)
Key-value parameter dictionary to be passed to the renderer. If not set, it should be null.
NOTE: For baseUnit, contentType, slotType, soAdUnit and creativeApi, if multiple values are to be set, use comma to separate values. For example, set "image/png,image/gif" to contentType.
Method: setCapability Set the capabilities supported by the player. This capability setting will change the flags in adrequest. Some of the flags are managed by Ad Manager and can not be changed, e.g. +vicb
(String)
must be one of:
(String)
must be one of:
<CAPABILITY_STATUS_OFF>
<CAPABILITY_STATUS_ON>
Setting the capability will effect the metr value in the ad request.
Method: setParameter Set the parameters for a special level.
Method: setVideoState Set the video state. Player is expected to notify AdManager about its current playback state by calling this method.
(String)
video play state, must be one of:
Method: getAdVolume Gets the volume of video/audio ads.
Return: Current ad volume {number}.
Note:
FreeWheel JavaScript SDK's ad volume concept is slightly different from HTML5 video's volume property's definition. getAdVolume() returns 0 if the video's muted
property is set to true, otherwise it returns the value of the volume
property of the content video element.
Method: setAdVolume Sets the volume of video/audio ads. Must be called after invoking registerVideoDisplayBase(), setContentVideoElement() or registerCustomPlayer() after which a video element/custom player is available to AdManager.
(Number)
Desired volume of video/audio ads. Must be a number between 0.0 and 1.0.
Example values:
* 1.0 is the highest volume (100%. This is default)
* 0.5 is half volume
* 0 is silent (same as mute)
Note:
Calling this method during a video / VPAID ad will result in a volume change and/or muted state change in the video element. This is equivalent in effect to setting videoElement.volume or videoElement.muted(if you want to mute / unmute) directly.
For example, setAdVolume(0) will result in the video element's volume
being set to 0 as well as muted
being set to true;
setAdVolume(0.7) will result in the video element's volume
being set to 0.7 as well as muted
being set to false.
On iOS devices, due to system restrictions, only 0 and 1 work, meaning you can only completely mute or unmute an ad. See https://developer.apple.com/library/content/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
Method: registerVideoDisplayBase Register the display area for temporal ads display, the area, typically is a div or span, could be any other HTML element, must contains the video element of the content video. And if the video size changed, player can invoke this API again with the same parameter to notify AdManager.
(String)
The id attribute of the HTML element which contains the content video's video element.
Method: setContentVideoElement Set the content video element. And if the video size changed, player can invoke this API again with the same parameter to notify AdManager.
(Element)
The content video
element.
Note: The parent node of the video element will be used as temporal slot base.
Method: setVideoDisplayCompatibleSizes Set a list of acceptable alternative dimensions. This will set the cd parameter in the ad request.
(Array)
An array of compatible dimensions object.
Note: The dimension object must have property named width and height, the value is unsigned int.
//create an array contains compatible dimensions which are n number of untyped objects
var dimensions = [{width:1920, height:1080}, {width:1280, height:720}];
// pass the array to Context
context.setVideoDisplayCompatibleSizes(dimensions);
Method: setVideoAsset Set the video asset info for the ad request.
(String/Number)
The id of the video asset which correspond to the ad request. This will set the caid or asid parameter in the ad request.
(Number)
The total duration of the video asset in seconds. This will set the vdur parameter in the ad request.
(Number)
Optional. The network id of the video asset. This will set the asnw parameter in the ad request.
(String)
Optional. The location of the video asset. This will set the asml parameter in the ad request.
(Number)
Optional, default is VIDEO_ASSET_AUTO_PLAY_TYPE_ATTENDED. This will affect the flag parameter in the ad request.
Whether the video will be played without user interactive, must be one of:
(Number)
Optional. The view random number of the Video Asset. This will set the vprn parameter in the ad request.
(String)
Optional, default is ID_TYPE_CUSTOM. Must be one of:
(Number)
Optional. The fallback id of the video asset. This will set afid parameter in the ad request.
(String)
Optional, default is VIDEO_ASSET_DURATION_TYPE_EXACT. This will set the vdty parameter in the ad request.
Must be one of:
Method: setVideoAssetCurrentTimePosition Set the current logical time position of the content asset. This will set the vtpo parameter in the ad request.
(Number)
Time position value in seconds.
NOTE: If the stream is broken into multiple distinct files, this should be the time position within the asset as a whole.
Method: setSiteSection Set the site section info for the ad request.
(String/Number)
{String|Number} The id of the site section which correspond to the ad request. This will set the csid or ssid paramater in the ad request.
(Number)
Optional. The networkId of the site section. This will set the ssnw parameter in the ad request.
(Number)
Optional. The view random number of the page. This will set the pvrn parameter in the ad request.
(String)
Optional, default is ID_TYPE_CUSTOM . Must be one of:
(Number)
The fallback id of the site section. This will set the sfid parameter in the ad request.
Method: setVisitor Set the visitor info for the ad request.
Method: startSubsession Start a subsession with the given token. Subsequent requests will be in the same subsession, until this method is called again with a different token.
(Number)
The token to start the subsession with. Positive integer. This will set the ssto parameter in the ad request.
Method: setRequestMode Set request mode of AdManager. This will set the mode parameter in the ad request.
(String)
Default is REQUEST_MODE_ON_DEMAND. Must be one of:
NOTE: AdManager runs in On-Demand mode(tv.freewheel.SDK.REQUEST_MODE_ON_DEMAND) by default, invoke this method to set a player to a different mode.
Method: addTemporalSlot Add a temporal slot.
(String)
Custom id of the slot, add a slot with an identical name as existing slot will fail. This will set the slid parameter in the ad request.
(String)
ad unit supported by the slot. It can be one of <ADUNIT_*> or custom adUnit. This will set the slau parameter in the ad request.
(Number)
Time position of the slot in seconds. This will set the tpos parameter in the ad request.
(String)
Optional. Profile name of the slot. This will set the envp parameter in the ad request.
(Number)
Optional. Cuepoint sequence override. This will set the cpsq parameter in the ad request.
(Number)
Optional. Maximum duration of the slot allowed. Default value is (0) = unlimited. This will set the maxd parameter in the ad request.
(Number)
Optional. Minimum duration of the slot allowed. Default value is (0) = no minimum duration requirement. This will set the mind parameter in the ad request.
(String)
Optional. Accepted content types, use “,” as delimiter. This will set the prct parameter in the ad request.
(String)
Optional. Signal ID, only applicable in Linear TV Streams, of the break. This will set the sgid parameter in the ad request.
(Number)
Optional. Slot parameter which specifies the maximum number of ads that can be returned for a given slot. Default value is (0) = no maximum number of ads. This will set the maxa parameter in the ad request.
Method: getTemporalSlots Get all the temporal slots from the response.
Return: An array of tv.freewheel.SDK.Slot instances.
Method: getSlotsByTimePositionClass Get all slots in specified time position class.
(String)
Time position of the slot. Must be one of the following:
Return: An array of tv.freewheel.SDK.Slot instances.
Method: submitRequest Submit the ad request to the FreeWheel server which is set by tv.freewheel.SDK.AdManager.setServer.
(Number)
Optional, default value is 5. The timeout time in seconds for request, positive value valid.
See also: AdManager.setServer
Method: addEventListener Add listener for a Context event.
(String)
event name, must be one of:
(function)
callback function.
Method: removeEventListener remove listener from a Context event.
Method: dispose Stop currently playing slot and dispose this context instance. If the player wants to submit request multiple times by using the same object, the player must dispose Context firstly before submit request, then create a new one. NOTE: This method should not be invoked synchronously in the handler of any AdManager posted event.
Method: loadExtension Load the extension from the given URL
(any)
Method: registerCustomPlayer Registers a custom player where the ad will render. This is currently only used by our CustomPlayerRenderer (as of 6.43.0). If you need to use custom extensions like OMSDKExtension or Moat Extension that require a video element, please either call Context.registerVideoDisplayBase() or Context.setContentVideoElement() to provide it.
(CustomPlayer)
The custom player object where the ad will render.
This object is implemented by the client, and must implement the following methods, which are called by the CustomPlayerRenderer:
open(creativeRendition, adListener) - Set the creativeRendition and adListener, and start playback.
Parameter:
creativeRendition The creative rendition of the ad video. Users can get the url from the creative rendition asset by calling
creativeRendition.getPrimaryCreativeRenditionAsset().getProxiedUrl()
adListener A reference to the adListener object created by the CustomPlayerRenderer.
getDuration()
Return:
{Number} The duration of the currently playing video.
getPlayheadTime()
Return:
{Number} The playhead time of the currently playing video.
playPause(isPause) - Pause or resume video playback.
Parameter:
isPause - {Boolean} If true, indicates that the call to this method should pause the video. Otherwise the call should play the video.
Method: setAiringStartTimeAndBreakSequence Sets aist and bksq parameters in the ad request. Both values must be greater than zero for the parameters to be included in the global parameters of the adrequest. These parameters are only designed for STB integrations.
Class: AdListener Used in integrations that utilize the CustomPlayerRenderer. Provides methods the custom player can call to notify AdManager when ad playback has completed, or encountered an error. An instance of this class is passed to the client's custom player by the CustomPlayerRenderer in custom player's open method.
Namespace: tv.freewheel.SDK
Method: onEnded Notifies AdManager that the ad playback has ended.
Method: getClickThroughUrls Get click event callbacks
Return: An array of specified click event callback URLs. If no click event callback URL is found, the array is empty. The first element is the defaultClick url. All the other elements are the tracking urls.
Class: Slot
Namespace: tv.freewheel.SDK
Method: getAdCount Get the count of the ads in the slot.
Return: Count of the ads in the slot.
Method: getTimePosition Get the time position of the slot.
Return: Time position {Number} of the slot in seconds.
Method: getEndTimePosition Get the end time position of the slot.
Return: End time position {Number} of the slot in seconds, -1 if not available or invalid.
Method: getTimePositionClass Get the time position class of the slot.
Return: One of the following:
Method: getWidth Get the width of the slot.
Return: The width {Number} of the slot in pixel.
Method: getHeight Get the height of the slot.
Return: The height {Number} of the slot in pixel.
Method: getBase Get the slot base of this slot.
Return: The base document element which contains this slot's element.
See also: Context.registerVideoDisplayBase
Method: getSignalId Get the signal Id of the break. Only applicable in TV streams.
Return: The string representation of the signal Id (can be null/undefined).
Method: play Play the slot.
Method: stop Stop the slot. NOTE: This method should not be invoked synchronously in the handler of any AdManager posted event.
Method: pause Pause the slot. Pausing the slot only works when the current ad has started playback. This limitation will be addressed in later releases. This method should not be invoked synchronously in the handler of any event posted by AdManager.
Method: resume Resume the slot. Resuming the slot only works when the current ad has started playback. This limitation will be addressed in later releases. This method should not be invoked synchronously in the handler of any event posted by AdManager.
Method: getParameter Get the parameter set on slot level.
Return: The parameter value for the specified name. Returns {undefined} if the parameter is not found on slot level.
(any)
Method: getTotalDuration Get the duration in seconds of the slot.
Return: The duration of the slot, or -1 if the actual duration is unknown.
Method: getPlayheadTime Get the playheadTime in seconds of the slot.
Return: The playheadTime of the slot, or -1 if the actual playheadTime is unknown.
Method: getAdInstances Get all the playble ad instances in the slot.
Return: An array of
Method: setVisible Set the visibility of a nontemporal slot. By default the slot is visible.
(any)
Method: skipCurrentAd Skip the currently playing ad and move to the next queued ad in the slot Fallback ads associated with the skipped ad will not be played.
Notes regarding skipping VPAID ads:
- If the VPAID implements skip functionality, AdManager will only call the VPAID skipAd() method if AdSkippableState is true. If AdSkippableState is false, AdManager will listen for AdSkippableState change events, and call skipAd() once the AdSkippableState is true.
- If the VPAID does not implement skip functionality, AdManager will handle skipping the ad.
- If this method is called before the VPAID creative has loaded, AdManager will skip the ad, regardless of whether or not the VPAID implements skip functionality.
Class: AdInstance
Namespace: tv.freewheel.SDK
Method: getAdId Get the FreeWheel ad ID of the ad instance.
Return: The FreeWheel ad ID of the ad instance.
Method: getParameter Get the parameter set on AdInstance level.
The parameter value will be retrieved from levels in the following order:
override, profile, global, creative rendition, creative, slot.
Return: The parameter value for the specified name. Returns {undefined} if the parameter is not found on AdInstance level.
(any)
Method: getUniversalAdId Get the universal ad ID of the ad instance, if it is returned in the JSON ad response. If there is no universal ad ID in the JSON ad response, and the ad is a VAST ad, this method will return the universal ad ID from the VAST ad, if applicable. Note that this only applies to VAST ads after they have started playback. For more information on the IAB Universal Ad ID, please refer to section 3.7.1 in the VAST 4.0 spec: https://www.iab.com/guidelines/digital-video-ad-serving-template-vast-4-0/.
Return: The universal ad ID of the ad instance. If null, no universal ad ID is available. If not null, the returning value is an object containing two properties: idRegistry and idValue.
Method: getSoAdUnit Get the soAdUnit of the ad instance.
Return: The soAdUnit of the ad instance.
Method: getActiveCreativeRendition Get the active creative rendition.
Method: addCreativeRendition Create a creative rendition clone for translation, and add it to current ad's creative rendition array.
Return: The object created and added to the ad.
Method: getAllCreativeRenditions Get all the creative renditions of the ad instance.And the primary creative rendition is the first element in the returned array.
Return: An array of
Method: getRenderableCreativeRenditions Get renderable creative renditions. The primary creative rendition is the first element of the array.
Method: setActiveCreativeRendition Set active creative rendition.
(CreativeRendition)
: The
object to be set as active one.
Method: getEventCallbackUrls Get the callback urls for a specific event.
(String)
name of the event.
(String)
type of the event.
Return: An array of specified event callback URLs. If no event callback URL is found, the array is empty.
Usage: Available event types: corresponding event name(s)
*EVENT_TYPE_CLICK*: EVENT_AD_CLICK
*EVENT_TYPE_CLICK_TRACKING*: EVENT_AD_CLICK
*EVENT_TYPE_IMPRESSION*: EVENT_AD_IMPRESSION, EVENT_AD_FIRST_QUARTILE, EVENT_AD_MIDPOINT, EVENT_AD_THIRD_QUARTILE, EVENT_AD_COMPLETE
*EVENT_TYPE_STANDARD*: EVENT_AD_PAUSE, EVENT_AD_RESUME, EVENT_AD_REWIND, EVENT_AD_MUTE, EVENT_AD_UNMUTE, EVENT_AD_COLLAPSE, EVENT_AD_EXPAND, EVENT_AD_MINIMIZE, EVENT_AD_CLOSE, EVENT_AD_ACCEPT_INVITATION
Method: addEventCallbackUrl Add the callback url to a specific event.
(String)
name of the event.
(String)
type of the event.
(Array)
{Array} urls of the event callback.
Usage: Available event types: corresponding event name(s)
*EVENT_TYPE_CLICK*: EVENT_AD_CLICK
*EVENT_TYPE_CLICK_TRACKING*: EVENT_AD_CLICK
*EVENT_TYPE_IMPRESSION*: EVENT_AD_IMPRESSION, EVENT_AD_FIRST_QUARTILE, EVENT_AD_MIDPOINT, EVENT_AD_THIRD_QUARTILE, EVENT_AD_COMPLETE
*EVENT_TYPE_STANDARD*: EVENT_AD_PAUSE, EVENT_AD_RESUME, EVENT_AD_REWIND, EVENT_AD_MUTE, EVENT_AD_UNMUTE, EVENT_AD_COLLAPSE, EVENT_AD_EXPAND, EVENT_AD_MINIMIZE, EVENT_AD_CLOSE, EVENT_AD_ACCEPT_INVITATION
*EVENT_ERROR: EVENT_TYPE_ERROR
Method: getSlot Get the slot of the ad.
Return: The object that contains this ad.
Method: getCompanionAdInstances Get the playable companion ad instances.
Returns: {Array} Array of s.
Method: isRequiredToShow Whether the ad is required to be shown by law, usually the ad is a companion ad.
Returns: A Boolean true if this ad is required to be shown, otherwise false.
Method: getRendererController Get the rendererController object for this AdInstance.
Return: The instance for this AdInstance.
Method: getPlayheadTime Get the ad instance playheadTime
Return: Playhead time in seconds, -1 if not available.
Method: getDealId Get deal id of the ad instance if the ad is delivered via deal, otherwise it will be empty.
Return: {String} The deal id of the ad instance
Method: getOpenExchangeId Get the open exchange id of the ad instance if the ad is delivered via the Open Exchange rule, otherwise it will be empty.
Return: {String} The open exchange id of the ad instance
Method: getMarketUnifiedAdId Get the market unified ad id of the ad instance if the ad is delivered via deal or the Open Exchange rule, otherwise it will be empty.
Return: {String} The market unified ad id of the ad instance
Method: getAction Get the action string of the ad instance.
Return: {String} action string of the ad instance, empty string if the ad instance doesn't contain action string.
Method: getSkipOffset Get the skip offset of the skippable ad instance in seconds.
Return: {String} skipOffset of the ad instance in seconds, -1 if the ad instance doesn't contain skipOffset or has an invalid value.
Method: isFallbackAd is used to indicate if an ad is a fallback ad
Return: {Boolean} true if the ad is a fallback ad, otherwise false.
Method: getIcons Get the Icons per IAB VAST Icon spec (https://iabtechlab.com/wp-content/uploads/2019/06/VAST_4.2_final_june26.pdf section 3.11)
Return: {Element} object containing the Icons element from a third party VAST ad. This API should be called after receiving the defaultImpression event.
Method: getAllExtensions Get all Extensions
Return: {Array} of all Extensions as JSON objects.
Method: getDuration Get the duration of the ad instance. This method will return the most accurate value available to AdManager, which may come from the renderer or the ad response. The value reported by the renderer is considered more accurate than the value from the ad response (the creative duration value booked in MRM UI).
Return: {Number} duration of the ad instance in seconds, -1 if not available.
Class: CreativeRendition
Namespace: tv.freewheel.SDK
Method: getContentType Get the content type of the creative rendition.
Return: Content type in {String}.
Method: getWrapperType Get the wrapper type of the creative rendition.
Return: Wrapper type in {String}.
Usage: This method is for translator development only.
Method: getWrapperUrl Get the wrapper url of the creative rendition.
Return: Wrapper url in {String}.
Usage: This method is for translator development only.
Method: getBaseUnit Get the base unit of the creative rendition.
Return: Base unit in {String}.
Method: getPreference Get the preference of the creative rendition.
Return: Preference of this creative rendition in {Number}. Preference is a number describes the priority among all renditions in the same creative. Default preference value: 0
Method: setPreference Set the preference of the creative rendition.
(any)
Method: getWidth Get the width of the creative rendition.
Return: {Number} width in pixels.
Method: getHeight Get the height of the creative rendition.
Return: {Number} height in pixels.
Method: getDuration Get the duration of the creative rendition.
Return: Duration in seconds.
Method: addCreativeRenditionAsset Add a creative rendition asset to the this creative rendition.
Method: getPrimaryCreativeRenditionAsset Get the primary asset of the creative rendition.
Return: The primary asset of the creative rendition.
Method: getOtherCreativeRenditionAssets Get other creative rendition assets.
Return: An array of other creative rendition assets. The array may be empty.
Method: getCreativeApi Get the creativeApi name of the creative rendition.
Return: A string represent the creativeApi name.
Method: getAdSkippableState A method that indicates wether or not an ad is skippable when it is called.
Return: For third party VAST Linear Skippable ads, it returns true if the ad playhead time of an ad passes the skipoffset time. Otherwise, it returns false. If there is no skipoffset time, it always returns false. For VPAID ads, this returns true if the ad is skippable. Otherwise it returns false.
Class: CreativeRenditionAsset
Namespace: tv.freewheel.SDK
Method: getName Get the name of the creative rendition asset.
Return: Asset name in {String}.
Method: getUrl Get the url of the creative rendition asset.
Return: Url in {String}.
Method: getContent Get the content of the creative rendition asset.
Return: Content is {String}.
Method: getContentType Get the content type of the creative rendition asset.
Return: Asset content type in {String}.
Method: getMimeType Get the mime type of the creative rendition asset.
Return: Asset mime type in {String}.
Method: getBytes Get the size of the creative rendition asset in bytes.
Return: Asset size in bytes.
Interface: Renderer Renderer interface to be implemented.
Method: start Notify the renderer to start ad playback.
rendererController - the <RendererController> instance that initiates the renderer.
(any)
Method: stop Notify the renderer to stop ad playback. Resources created during the renderer lifetime should be disposed in this method.
Method: pause Notify the renderer to pause ad playback. The renderer is supposed to call RendererController.processEvent(EVENT_AD_PAUSE) to notify the FW SDK that the ad is paused.
Method: resume Notify the renderer to resume ad playback. The renderer is supposed to call RendererController.processEvent(EVENT_AD_RESUME) to notify the FW SDK that the ad is resumed.
Method: info Get the module info of renderer.
Return: An object of properties: moduleType, moduleVersion, requiredAPIVersion.
Method: getPlayheadTime Get the ad playheadTime
Return: Playhead time in seconds, -1 if not available.
Method: getDuration Get the duration of the ad. It returns the most accurate value available to AdManager, which may come from the renderer or the ad response XML. The value reported by the renderer is considered more accurate than the value from ad response, aka. the creative duration value booked in MRM UI.
Returns: Duration in seconds, -1 if not available.
Method: resize Resize the ad
Method: setVolume
Set the volume of the ad
When called, the renderer is expected to update the volume for the
current ad playback and dispatch EVENT_AD_VOLUME_CHANGE
by
calling RendererController.processEvent({name:EVENT_AD_VOLUME_CHANGE})
if the ad volume is changed.
(Number)
the desired volume of the ad playback. Note: volume is
expected to be in the range of [0,1]
Class: RendererController RendererController acts as a bridge between AdManager and a renderer.
Namespace: tv.freewheel.SDK
Method: processEvent Process renderer event
(Object)
hash object to be processed. Available keys:
INFO_KEY_CUSTOM_EVENT_NAME When name is EVENT_AD_CLICK, renderer tells the custom click event to be processed via this key.
INFO_KEY_SHOW_BROWSER Optional. Force opening/not opening the event callback url in new window.
INFO_KEY_URL Optional. Override the url to open or redirect on EVENT_AD_CLICK.
INFO_KEY_CONCRETE_EVENT_ID Optional. When name is EVENT_AD_MEASUREMENT, renderer tells the concrete event ID via this key. The concrete event ID should be a string.
NOTE: This method should not be used to process EVENT_AD_IMPRESSION or EVENT_AD_IMPRESSION_END event. Please use handleStateTransition() for these events.
var event = {"name": tv.freewheel.SDK.EVENT_AD_CLICK, "info": {}};
event["info"][tv.freewheel.SDK.INFO_KEY_CUSTOM_EVENT_NAME] = "CustomClick_1";
event["info"][tv.freewheel.SDK.INFO_KEY_SHOW_BROWSER] = true;
event["info"][tv.freewheel.SDK.INFO_KEY_URL] = "http://www.foo.com";
theFWRendererController.processEvent(event);
Method: handleStateTransition Handle renderer state transition
(String)
name of the renderer state event.
(String)
Optional. The additional info to be passed, used for failing condition.
var info = {"errorCode": tv.freewheel.SDK.ERROR_DEVICE_LIMIT, "errorInfo": "Unable to play the ad on this device."};
theFWRendererController.handleStateTransition(tv.freewheel.SDK.RENDERER_STATE_FAILED, info);
Method: getVersion Get the version of AdManager.
Return: Major version of AdManager, e.g. 0x02060000 for v2.6 .
Method: getParameter Get the parameter with a specific name. The parameter value will be retrieved from levels in the following order: override, creative rendition, creative, slot, profile, global.
Method: getAdInstance Get the corresponding ad instance of this renderer controller.
Return: The object.
Method: getCompanionSlots Get all placeholder companion slots of this ad.
Return: {Array} Array of placeholder companion s.
Method: commitAdInstances Commit scheduled ad instances.
Method: getContentVideoElement Get content video element
Return: The content video element {Element}
Class: Extension Extension class provides methods to implement Extension Modules
Namespace: tv.freewheel.SDK
Interface: Translator Translator interface to be implemented.
Namespace: tv.freewheel.SDK
Namespace: tv.freewheel.SDK
Constant: ADUNIT_PREROLL
Type of ad unit: preroll.
Constant: ADUNIT_MIDROLL
Type of ad unit: midroll.
Constant: ADUNIT_POSTROLL
Type of ad unit: postroll.
Constant: ADUNIT_OVERLAY
Type of ad unit: overlay.
Constant: ADUNIT_STREAM_PREROLL
Type of ad unit: preroll of a live stream.
Constant: ADUNIT_STREAM_POSTROLL
Type of ad unit: postroll of a live stream.
Constant: ADUNIT_PAUSE_MIDROLL
Type of ad unit: midroll ad that is displayed when content video is paused.
Constant: TIME_POSITION_CLASS_PREROLL
Constant: TIME_POSITION_CLASS_MIDROLL
Constant: TIME_POSITION_CLASS_POSTROLL
Constant: TIME_POSITION_CLASS_OVERLAY
Constant: TIME_POSITION_CLASS_DISPLAY
Constant: PARAMETER_ENABLE_FORM_TRANSPORT
Whether or not to send request and ping callbacks by submitting forms.
This parameter needs to be set before submitting the request.
Default value: false.
//Enable form submitting
theContext.setParameter(tv.freewheel.SDK.PARAMETER_ENABLE_FORM_TRANSPORT, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_ENABLE_JS_TRANSPORT
Whether or not to send request and ping callbacks using XMLHttpRequest.
This parameter needs to be set before submitting the request.
Default value: false.
//Enable JS transport
theContext.setParameter(tv.freewheel.SDK.PARAMETER_ENABLE_JS_TRANSPORT, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_ENABLE_ACCESS_CONTROL_ALLOW_CREDENTIALS
Whether or not to send request and ping callbacks with credentials flag.
XMLHttpRequest from a different domain cannot set cookie values for their own domain unless withCredentials is set to true.
Default value: false.
//Enable JS transport
theContext.setParameter(tv.freewheel.SDK.PARAMETER_ENABLE_ACCESS_CONTROL_ALLOW_CREDENTIALS, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: URL_PARAMETER_KEY_FWU_TOPIC
The key for manually setting the topics key/value in the Ad Request URL.
The value associated with this key should be a string in the following format: 'version1:topic1,version2:topic2,version3:topic3'.
When manually setting the value, adManager.enableTopics() should not be called. If adManager.enableTopics() is called when manually setting this key/value, AdManager will ignore adManager.enableTopics() and populate the key/value pair with the value provided by the client.
// Manually add topics key/value to the Ad Request URL
const topicsString = topics.map(t => t.version + ':' + t.topic).join(',');
theContext.addKeyValue(tv.freewheel.SDK.URL_PARAMETER_KEY_FWU_TOPIC, topicsString);
Constant: PARAMETER_DESIRED_BITRATE
Desired bitrate (user bandwidth) set by player. Once set, the value will be used in video ad renderer for rendition selection.
The value should be in kbps. This parameter should be set on level PARAMETER_LEVEL_OVERRIDE.
// Suppose user bandwidth is 500kbps:
theContext.setParameter(tv.freewheel.SDK.PARAMETER_DESIRED_BITRATE, 500, tv.freewheel.SDK.PARAMETER_LEVEL_OVERRIDE);
Constant: PARAMETER_PAGE_SLOT_CONTENT_TYPE
The parameter to configure primary content type of scanned page slot. Note that this parameter only can set in player side. When using two or more content type, make sure they are separated by commas.
Default value is 'text/html_doc_lit_mobile,text/html_doc_ref'. Optional content type:
// Suppose use 'text/html_doc_lit_mobile' and 'text/html_doc_ref':
theContext.setParameter(tv.freewheel.SDK.PARAMETER_PAGE_SLOT_CONTENT_TYPE, 'text/html_doc_lit_mobile,text/html_doc_ref',tv.freewheel.SDK.PARAMETER_LEVEL_OVERRIDE);
Constant: PARAMETER_EXTENSION_AD_CONTROL_CLICK_ELEMENT
The parameter to config which element AdManager would listen and process click event on.
//Config AdManager to process click event on an existing element with id 'Element_Click_Target'
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_AD_CONTROL_CLICK_ELEMENT, 'Element_Click_Target', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED
The boolean value to control whether the JSAM or player should listen and handle <EVENT_CONTENT_VIDEO_*> events.
Default value is true.
//Disable the content video extension, player will handle all the EVENT_CONTENT_VIDEO_* events.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_PAUSE_AD_ENABLE
The boolean value to control whether the AdManager should handle PAUSE_MIDROLL slots.
Default value is true.
//Disable pause ad extension
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_PAUSE_AD_ENABLE, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ENABLE
The boolean value to control whether the AdManager should enable the QRCodeExtension.
Default value is false.
//Enable qrcode extension
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ENABLED, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ELEMENT_ID The id of an element which will hold the QR code for the QRCodeExtension.
//Config the QRCodeExtension to render the QR code in an existing element with id, i.e. 'QR_Code_Element_Id'
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ELEMENT_ID, 'QR_Code_Element_Id', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ELEMENT_CLASS A string that the QRCodeExtension should use for the QR code element className.
//Config the QRCodeExtension to render the QR code in an existing class with id, i.e. 'QR_Code_Element_Class'
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ELEMENT_CLASS, 'QR_Code_Element_Class', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ELEMENT_LIGHT_HEX_COLOR A string that the QRCodeExtension should use for the light color of the QR code.
//Config the QRCodeExtension to use '#ffffff' as the light color of the QR code.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ELEMENT_LIGHT_HEX_COLOR, '#ffffff', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ELEMENT_DARK_HEX_COLOR A string that the QRCodeExtension should use for the dark color of the QR code.
//Config the QRCodeExtension to use '#000000' as the dark color of the QR code.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ELEMENT_DARK_HEX_COLOR, '#000000', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_QRCODE_ERROR_CORRECTION_LEVEL A string that the QRCodeExtension should use for the error correction level of the QR code.
//Config the QRCodeExtension to use 'H' as the error correction level of the QR code.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_QRCODE_ERROR_CORRECTION_LEVEL, 'H', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_OMSDK_ENABLED
The boolean value to control whether the AdManager should enable the OMSDK extension.
Default value is false.
//Enable the OMSDK extension
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_OMSDK_ENABLED, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_SKIPPABLE_AD_ENABLED
The boolean value to control whether AdManager should enable the SkippableAdExtension.
Default value is false.
//Enable the SkippableAdExtension
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_SKIPPABLE_AD_ENABLED, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_SKIPPABLE_AD_CONTROL_CLICK_ELEMENT
The ID of an element that the SkippableAdExtension should use for the skip button.
Whether set or not, the SkippableAdExtension will hide the skip button, and only display it when a VAST Linear Skippable Ad is being played. The SkippableAdExtension will also disable the button and only enable it when the skippable state for the ad is true.
//Config the SkippableAdExtension to process click event on an existing element with id 'Skip_Button_Element_Id'
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_SKIPPABLE_AD_CONTROL_CLICK_ELEMENT, 'Skip_Button_Element_Id', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_SKIPPABLE_AD_BUTTON_TEXT
A string that the SkippableAdExtension should use for the skip button text.
This parameter can be used both when using the default skip button, as well as a custom skip button.
//Config the SkippableAdExtension to display 'Custom Button Text' on the skip button.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_SKIPPABLE_AD_BUTTON_TEXT, 'Custom Button Text', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_SKIPPABLE_AD_BUTTON_CLASS
A string that the SkippableAdExtension should use for the skip button className.
This parameter only works when the default skip button is used. If PARAMETER_EXTENSION_SKIPPABLE_AD_CONTROL_CLICK_ELEMENT is set, this parameter will have no effect.
//Config the SkippableAdExtension to set the default skip button className to 'CssClass1 CssClass2',
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_SKIPPABLE_AD_BUTTON_CLASS, 'CssClass1 CssClass2', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_CONTENT_VIDEO_AUTO_SEEK_BACK
The boolean value to control whether JSAM will auto seek back after midroll on iPad.
On iPad 3.2 and above, when user clickthroughs on midroll video ad and return, content video will lost all the playback state. In this case, when midroll playback completes, content video will restart from the beginning, rather than resuming at the previous pause point. To improve User Experience, JSAM implements this logic for iPad:
This parameter is the boolean value to control whether this auto seeking logic would be enabled.
Default value is true.
//Disable the auto seeking back logic.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_AUTO_SEEK_BACK, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_START_DETECT_TIMEOUT
The timeout in milliseconds for VideoRenderer.
VideoRenderer will timeout if ad playback does not successfully start.
Default value is 5000 milliseconds.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_START_DETECT_TIMEOUT, 5000, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_VAST_TIMEOUT_IN_MILLISECONDS
The timeout in milliseconds for VAST Translator to load VAST url.
Translator will timeout if the target VAST url does not respond.
Default value is 5000 milliseconds.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_VAST_TIMEOUT_IN_MILLISECONDS , 10000, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_PROGRESS_DETECT_TIMEOUT
The timeout in milliseconds for VideoRenderer, CustomPlayerRenderer and DashRenderer to detect video ad progress timeout.
VideoRenderer, CustomPlayerRenderer and DashRenderer will timeout if ad playback progress stalls after playback starts.
Default value is 8000 milliseconds.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_PROGRESS_DETECT_TIMEOUT , 10000, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE
The boolean value to control whether ad video element's default controls should be displayed when pause.
When playing video ad, pause event may be fired by click through or some other reason. Then user should be granted the capability to resume ad playback after pause.
By setting this parameter to false, player is notifying VideoRenderer not to display default controls when pause. So player should add some custom controls for user to resume in this case.
Default value is true.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_EXTENSION_SURVEY_ENABLED
The boolean value to control whether SurveyExtension should be enabled.
When an ad starts play, SurveyExtension will check the ad's creative to see if it has the survey url to pingback. If yes, SurveyExtension will append the survey url as script link to the page's head element.
By setting this parameter to false, SurveyExtension won't pingback the survey url no matter it exists or not.
Default value is true.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_SURVEY_ENABLED, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_DISPLAY_COAD_SCRIPT_NAME
The js function name to render HTML content for display ad.
The js function must exist on Client's page.
Constant: PARAMETER_EXTENSION_VIDEO_STATE_ENABLED
Used to enable the VideoStateExtension. If set to true, the VideoStateExtension will set the video state to "PLAYING" and the video view callback will be sent after the ad request completes. That means the first video view callback is sent before preroll ads play.
Valid values: true, false
Required: No
Default value: false
theContext.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_VIDEO_STATE_ENABLED, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_ANDROID_DELAY
Delay in milliseconds between video load and play when using Android browser.
Valid values: Integer
Required: No
Default value: 100
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_ANDROID_DELAY, 500, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_CLICK_DETECTION
Controls whether the VideoRenderer will process or ignore clicks on the advertisement. When set to false, VideoRenderer will ignore clicks. Allows a player development team to implement their own click handling instead of letting AdManager do this for them.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_CLICK_DETECTION, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_VIDEO_PLAY_AFTER_STALLED
When set to true, VideoRenderer will try to continue playing ad when stalled event is dispatched by video element.
Valid values: true, false
Required: No
Default value: false
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_PLAY_AFTER_STALLED, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_AUTO_PAUSE_AD_ONVISIBILITYCHANGE
Controls whether the ad will automatically pause when the browser window goes out of focus. When set to false, this parameter will turn off the auto pause feature.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_AUTO_PAUSE_AD_ONVISIBILITYCHANGE, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_DISABLE_CORS_ENFORCEMENT
Controls whether CORS enforcement is disabled for VPAID creatives. Set to false to require CORS enforcement.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_DISABLE_CORS_ENFORCEMENT, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_SHOULD_BACKGROUND_TRANSPARENT
Provides functionality to control the background transparency settings of nontemporal display ads rendered within the application.
Valid values: "YES", "NO"
Required: No
Default value: "NO"
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_SHOULD_BACKGROUND_TRANSPARENT, "YES", tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_RENDER_IMAGE_WITHOUT_IFRAME
When set to true, ads with content type image/jpeg, image/gif, image/bmp, and image/png will be rendered without an iFrame by the HTMLRenderer
Valid values: true, false
Required: No
Default value: false
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_RENDER_IMAGE_WITHOUT_IFRAME , true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_SHOULD_END_AFTER_DURATION
Controls if overlay ads will end when the creative duration time is reached.
Valid values: true, false
Required: No
Default value: False when slot type is display. True for other slot types.
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_SHOULD_END_AFTER_DURATION, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_AD_LOAD_TIMEOUT
The timeout in seconds for HTMLRenderer. HTMLRenderer will timeout if the ad does not load in time.
Valid values: Unsigned integer
Required: No
Default value: 5 seconds
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_AD_LOAD_TIMEOUT, 10, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_PRIMARY_ANCHOR
Sets the primary anchor for overlay ads. Valid values: 'tc', 'bc', 'ml', 'mr', 'tl', 'tr', 'bl', 'br'
Required: No
Default value: 'bc'
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_PRIMARY_ANCHOR, 'tc', tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_MARGIN_WIDTH
Sets the X axis margin offset to the primary anchor for overlay ads.
Valid values: Unsigned integer
Required: No
Default value: 0
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_MARGIN_WIDTH, 5, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_RENDERER_HTML_MARGIN_HEIGHT
Sets the Y axis margin offset to the primary anchor for overlay ads.
Valid values: Unsigned integer
Required: No
Default value: 0
theContext.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_HTML_MARGIN_HEIGHT, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_VPAID_CREATIVE_TIMEOUT_DELAY
The timeout in milliseconds for VPAIDRenderer. VPAIDRRenderer will timeout if the VPAID creative does not load in time.
Valid values: Unsigned integer
Required: No
Default value: 10000
theContext.setParameter(tv.freewheel.SDK.PARAMETER_VPAID_CREATIVE_TIMEOUT_DELAY, 5000, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_VAST_MAX_WRAPPER_COUNT
Sets the maximum limit of vast wrappers. VastTranslator will fail if too many wrapper responses have been recieved with no Inline response.
Valid values: Unsigned integer
Required: No
Default value: 5
theContext.setParameter(tv.freewheel.SDK.PARAMETER_VAST_MAX_WRAPPER_COUNT, 10, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_VAST_ASYNC_LOAD
If set to true, VastTranslator will asynchronously load VAST url
Valid values: true, false
Required: No
Default value: false
theContext.setParameter(tv.freewheel.SDK.PARAMETER_VAST_ASYNC_LOAD, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_VAST_LOAD_WITH_COOKIE
If set is true, VastTranslator will load VAST creative with cookies
Valid values: true, false
Required: No
Default value: false
theContext.setParameter(tv.freewheel.SDK.PARAMETER_VAST_LOAD_WITH_COOKIE, true, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_USE_GDPR_TCFAPI
Parameter to control whether AdManager should retrieve GDPR consent data from the IAB TCF/CMP API v2.0.
Beginning with 6.34.0, AdManager will not be compatible with TCF/CMP API 1.0 and 1.1.
Clients need to update to TCF/CMP API 2.0 if using AdManager version 6.34.0 or later.
JS AdManager versions 6.28.0 - 6.33.0 will only support TCF/CMP API 1.0 and 1.1.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_USE_GDPR_TCFAPI, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_USE_CCPA_USPAPI
Parameter to control whether AdManager should retrieve CCPA consent data from the IAB USP API.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_USE_CCPA_USPAPI, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_USE_GPP
Parameter to control whether AdManager should retrieve GPP consent data from the IAB GPP CMP API.
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_USE_GPP, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_CONSENT_RETRIEVAL_TIMEOUT
The timeout in milliseconds to wait for a response from the CMP/TCF API, USP API, and GPP API before submitting an ad request.
This timeout is separate from the ad request timeout.
Should be a multiple of 100.
If one or more of <PARAMETER_USE_GDPR_TCFAPI>, <PARAMETER_USE_CCPA_USPAPI> and <PARAMETER_USE_GPP> is set to true, AdManager will wait for a response from the corresponding consent API.
If <PARAMETER_USE_GDPR_TCFAPI>, <PARAMETER_USE_CCPA_USPAPI> and <PARAMETER_USE_GPP> are all set to false, this value will have no effect, and AdManager will not wait for a response.
Valid values: Unsigned integer, multiple of 100
Required: No
Default value: 500
theContext.setParameter(tv.freewheel.SDK.PARAMETER_CONSENT_RETRIEVAL_TIMEOUT, 100, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_SIMID_FULL_SCREEN_ALLOWED
Sets whether SIMID creatives may request to enter full screen mode
Valid values: true, false
Required: No
Default value: true
theContext.setParameter(tv.freewheel.SDK.PARAMETER_SIMID_FULL_SCREEN_ALLOWED, false, tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);
Constant: PARAMETER_LEVEL_PROFILE
Constant: PARAMETER_LEVEL_GLOBAL
Constant: PARAMETER_LEVEL_OVERRIDE
Constant: CAPABILITY_STATUS_OFF
Constant: CAPABILITY_STATUS_ON
Constant: CAPABILITY_SLOT_TEMPLATE
Player expects template-based slots generated by ad server.
Constant: CAPABILITY_MULTIPLE_CREATIVE_RENDITIONS
Player expects multiple creative renditions for an ad.
Constant: CAPABILITY_RECORD_VIDEO_VIEW
When set, one video view event will be recorded by the ad server for each ad request, and AdManager will not fire video view callbacks.
Constant: CAPABILITY_CHECK_COMPANION
Player expects ad server to check companion for candidate ads.
Constant: CAPABILITY_CHECK_TARGETING
Player expects ad server to check targeting for candidate ads.
Constant: CAPABILITY_RESET_EXCLUSIVITY
Player reset the exclusivity scope. Player can turn on/off this capability before making any request.
Constant: CAPABILITY_REQUIRE_ADVANCED_CALLBACK
Player expects ad server to return IAB callbacks besides impressions.
Only one of CAPABILITY_REQUIRE_ADVANCED_CALLBACK, CAPABILITY_REQUIRE_QUARTILE_CALLBACK, CAPABILITY_REQUIRE_COMPLETE_CALLBACK should be set.
If two or three appear together, only the last one will work.
Constant: CAPABILITY_REQUIRE_QUARTILE_CALLBACK
Player expects ad server to return IAB quartile callbacks besides impression.
Similar as CAPABILITY_REQUIRE_ADVANCED_CALLBACK but only ask for quartile callbacks and doesn't ask for other IAB callback URLs.
Only one of CAPABILITY_REQUIRE_ADVANCED_CALLBACK, CAPABILITY_REQUIRE_QUARTILE_CALLBACK, CAPABILITY_REQUIRE_COMPLETE_CALLBACK should be set. If two or three appear together, only the last one will work.
Constant: CAPABILITY_REQUIRE_COMPLETE_CALLBACK
Player expects ad server to return complete callbacks besides impression.
Need to turn on for UEX by count ad view on ad completion.
Only one of CAPABILITY_REQUIRE_ADVANCED_CALLBACK, CAPABILITY_REQUIRE_QUARTILE_CALLBACK, CAPABILITY_REQUIRE_COMPLETE_CALLBACK should be set. If two or three appear together, only the last one will work.
Constant: CAPABILITY_DISABLE_TRACKING_REDIRECT
Player adds 'dtrd' flag to the ad request and uses the first trackingURL as the clickThrough URL.
Constant: EVENT_REQUEST_COMPLETE
Type of AdManager event: an ad request is complete, either success or failure.
A player MUST respond to this event.
Event Parameters:
Constant: EVENT_SLOT_STARTED
Type of AdManager event: a slot starts.
Event Parameters:
Constant: EVENT_SLOT_ENDED
Type of AdManager event: a slot ends.
Event Parameters:
Constant: EVENT_ERROR
Event name: Ad error. Broadcasted with the type RENDERER_EVENT when there's any error.
Constant: EVENT_RESELLER_NO_AD
Event name: reseller no ad. Broadcasted with the type RENDERER_EVENT when FreeWheel fails to get any playable ad from a reseller.
Constant: EVENT_AD
Type of an IAB ad event.
Event Parameters: subType - the name of the renderer event, must be one of the following:
Constant: EVENT_AD_PREINIT
Type of AdManager event: a Renderer has been loaded for an AdInstance, and will start playback attempt.
Please note, PREINIT is not dispatched when replaying a slot (or the adInstance in it).
Event Parameters:
Constant: EVENT_AD_IMPRESSION
Type of AdManager event: an ad starts.
Event Parameters:
Constant: EVENT_AD_IMPRESSION_END
Type of AdManager event: an ad ends.
Event Parameters:
Constant: EVENT_AD_VOLUME_CHANGE
AdManager Event: ad volume has changed.
Event Parameters:
Constant: EVENT_AD_SKIPPABLE_STATE_CHANGED
Type of AdManager event: notifies that the ad is skippable when the current playhead time passes the skipoffset time. This will not fire if no skipoffset is provided.
Event Parameters:
Constant: EVENT_AD_FIRST_QUARTILE
Event name: Ad first quartile.
Constant: EVENT_AD_MIDPOINT
Event name: Ad midpoint.
Constant: EVENT_AD_THIRD_QUARTILE
Event name: Ad third quartile.
Constant: EVENT_AD_COMPLETE
Event name: Ad complete.
Constant: EVENT_AD_CLICK
Event name: Ad click.
Constant: EVENT_AD_MUTE
Event name: Ad mute.
Constant: EVENT_AD_UNMUTE
Event name: Ad unmute.
Constant: EVENT_AD_COLLAPSE
Event name: Ad collapse.
Constant: EVENT_AD_EXPAND
Event name: Ad expand.
Constant: EVENT_AD_PAUSE Event name: Ad pause.
Constant: EVENT_AD_RESUME
Event name: Ad resume.
Constant: EVENT_AD_REWIND
Event name: Ad rewind.
Constant: EVENT_AD_ACCEPT_INVITATION
Event name: Ad accept invitation.
Constant: EVENT_AD_CLOSE
Event name: Ad close.
Constant: EVENT_AD_SKIPPED
Event name: Ad skipped.
This event is fired when an ad is skipped as a result of calling Slot.skipCurrentAd(), or when a VPAID ad is skipped using logic implemented by the creative.
For VPAID ads, please note the following behavior:
Constant: EVENT_AD_PROGRESS
Event name: Ad progress. VPAID advertisements do not support this event.
Constant: EVENT_AD_MINIMIZE
Event name: Ad minimize.
Constant: EVENT_AD_MEASUREMENT
Event name: Ad Concrete event.
Constant: EVENT_CONTENT_VIDEO_PAUSE_REQUEST
Type of AdManager event: adManager is requesting to pause content video.
This event is added to facilitate the communication between adManager and player on the playback control of content video.
Defaultly(<PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED> is true), adManager will have one content video extension to listen on this event. When extension receives this event, it will hide and pause the content video.
If player want to listen and handle this event by itself, player MUST set <PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED> to false and implements player-side event handler to pause and hide content video.
Event Parameters: type - EVENT_CONTENT_VIDEO_PAUSE_REQUEST
Constant: EVENT_CONTENT_VIDEO_RESUME_REQUEST
Type of AdManager event: adManager is requesting to resume content video playback.
This event is added to facilitate the communication between adManager and player on the playback control of content video.
Defaultly(<PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED> is true), adManager will have one content video extension to listen on this event. When extension receives this event, it will resume and show the content video.
If player want to listen and handle this event by itself, player MUST set <PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED> to false and implements player-side event handler to resume and show content video.
Event Parameters: type - EVENT_CONTENT_VIDEO_RESUME_REQUEST
Constant: ID_TYPE_FW
Type of id: a unique id provided by FreeWheel.
Constant: ID_TYPE_CUSTOM
Type of id: a custom id provided by non-FreeWheel parties.
Constant: ID_TYPE_GROUP
Type of id: a unique group id provided by FreeWheel.
Constant: VIDEO_STATE_PLAYING
Current video is playing.
Constant: VIDEO_STATE_PAUSED
Current video is paused.
Constant: VIDEO_STATE_STOPPED
Current video has stopped.
Constant: VIDEO_STATE_COMPLETED
Current video has completed playing.
Constant: VIDEO_ASSET_AUTO_PLAY_TYPE_ATTENDED
Video asset auto play type: attended.
Constant: VIDEO_ASSET_AUTO_PLAY_TYPE_UNATTENDED
Video asset auto play type: unattended.
Constant: VIDEO_ASSET_AUTO_PLAY_TYPE_NONE
Video asset auto play type: non auto play.
Constant: VIDEO_ASSET_AUTO_PLAY_TYPE_CLICK_TO_PLAY
Video asset auto play type: click to play.
Constant: VIDEO_ASSET_DURATION_TYPE_EXACT
Video asset duration type: exact.
Constant: VIDEO_ASSET_DURATION_TYPE_VARIABLE
Video asset duration type: variable.
Constant: REQUEST_MODE_ON_DEMAND
Request mode: on-demand.
Constant: REQUEST_MODE_LIVE
Request mode: live.
Constant: RENDERER_STATE_STARTED
Constant: RENDERER_STATE_COMPLETED
Constant: RENDERER_STATE_FAILED
Constant: EVENT_TYPE_CLICK_TRACKING
Constant: EVENT_TYPE_IMPRESSION
Constant: EVENT_TYPE_CLICK
Constant: EVENT_TYPE_STANDARD
Constant: EVENT_AD_QUARTILE
Constant: EVENT_AD_FIRST_QUARTILE
Constant: EVENT_AD_MIDPOINT
Constant: EVENT_AD_THIRD_QUARTILE
Constant: EVENT_AD_COMPLETE
Constant: EVENT_AD_IMPRESSION
Constant: EVENT_AD_CLICK
Constant: EVENT_AD_MUTE
Constant: EVENT_AD_UNMUTE
Constant: EVENT_AD_COLLAPSE
Constant: EVENT_AD_EXPAND
Constant: EVENT_AD_PAUSE
Constant: EVENT_AD_RESUME
Constant: EVENT_AD_REWIND
Constant: EVENT_AD_ACCEPT_INVITATION
Constant: EVENT_AD_CLOSE
Constant: EVENT_AD_MINIMIZE
Constant: EVENT_AD_MEASUREMENT
Constant: EVENT_VIDEO_DISPLAY_BASE_CHANGED
An event sent when the video display base has changed.
Constant: EVENT_USER_ACTION_NOTIFIED
Used to notify AdManager of a user action
var event = {
action: tv.freewheel.SDK.EVENT_USER_ACTION_PAUSE_BUTTON_CLICKED
};
theContext.dispatchEvent(tv.freewheel.SDK.EVENT_USER_ACTION_NOTIFIED, event);
Constant: EVENT_USER_ACTION_PAUSE_BUTTON_CLICKED
Used to notify AdManager that the user paused the content video. This will trigger the PauseAdExtension to start a PAUSE_MIDROLL slot.
Constant: EVENT_USER_ACTION_RESUME_BUTTON_CLICKED
Used to notify AdManager that the user resumed the content video. This will trigger the PauseAdExtension to stop a PAUSE_MIDROLL slot.
Constant: INFO_KEY_ERROR_CODE
Constant: INFO_KEY_ERROR_INFO
Constant: INFO_KEY_SHOW_BROWSER
Constant: INFO_KEY_CONCRETE_EVENT_ID
Constant: INFO_KEY_AD_SKIPPABLE_STATE
Gets the boolean value associated with whether the skippable state has changed.
Constant: INFO_KEY_CUSTOM_EVENT_NAME
Constant: MODULE_TYPE_EXTENSION
Constant: MODULE_TYPE_RENDERER
Constant: MODULE_TYPE_TRANSLATOR
Constant: ERROR_IO
Constant: ERROR_TIMEOUT
Constant: ERROR_NULL_ASSET
Constant: ERROR_UNKNOWN
Constant: ERROR_MISSING_PARAMETER
Constant: ERROR_NO_AD_AVAILABLE
Constant: ERROR_PARSE
Constant: ERROR_INVALID_VALUE
Constant: ERROR_INVALID_SLOT
Constant: ERROR_3P_COMPONENT
Constant: ERROR_UNSUPPORTED_3P_FEATURE
Constant: ERROR_SECURITY
Constant: ERROR_UNMATCHED_SLOT_SIZE
Constant: ERROR_DASHJS
Constant: ERROR_HLSJS
This is used by VideoRenderer to report errors that were triggered by hls.js. Information on the errors can be found in the hls.js documentation - https://nochev.github.io/hls.js/docs/html/variable/index.html#static-variable-ErrorTypes
Constant: ERROR_CUSTOM_PLAYER
This is a default error type for Javascript CustomPlayerRenderer to report errors that were found in CustomPlayerRenderer. When the CustomPlayer goes wrong, client app can trigger this error by using adListener.onError("Error message").
Constant: TRANSLATOR_STATE_STARTED
Constant: TRANSLATOR_STATE_COMPLETING
Constant: TRANSLATOR_STATE_COMPLETED
Constant: TRANSLATOR_STATE_FAILED