WmmVideo.js
Class: WmmVideo
WmmVideo()
Creates a web monetized video element. <wmm-video>
Attributes:
* src: video file source; if full URL is used, the recipe verification will use the same host for verification.
* paymentUrl: Payment pointer URL, can also include receipt service url.
* skipVerification: if true, don't send receipts to backend for verifications.
Attributes:
* src: video file source; if full URL is used, the recipe verification will use the same host for verification.
* paymentUrl: Payment pointer URL, can also include receipt service url.
* skipVerification: if true, don't send receipts to backend for verifications.
Members
#
srcSynchronise wmm-video elements *src* attribute with inner video -elements *src* attrubute.
- Source:
Methods
(name, action)#
addEventListenerEvent listener for monetization and video events. Binding to monetization events ('monetizationStopped', 'monetized', 'monetizeFailed') allows tracking of monetization state, while all other events are passed to the inner <video> element and can be used to track the state of the media. E.g. https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
Parameters:
Name | Type | Description |
---|---|---|
name | string | Event name |
action | function | The action to execute on event. |
- Source:
()#
connectedCallbackInitializes monetization and styles when component is inserted into DOM.
- Source:
()#
disconnectedCallbackStops monetization and disconnects the media stream when component is removed from DOM.
- Source:
(name, action)#
removeEventListenerRemove monetization or video element listener
Parameters:
Name | Type | Description |
---|---|---|
name | string | Event name |
action | function | The action to execute on event. |
- Source: