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.

Constructor

new WmmVideo()#

Source:

Members

src#

Synchronise wmm-video elements *src* attribute with inner video -elements *src* attrubute.
Source:

Methods

addEventListener(name, action)#

Event 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:
NameTypeDescription
namestringEvent name
actionfunctionThe action to execute on event.
Source:

connectedCallback()#

Initializes monetization and styles when component is inserted into DOM.
Source:

disconnectedCallback()#

Stops monetization and disconnects the media stream when component is removed from DOM.
Source:

removeEventListener(name, action)#

Remove monetization or video element listener
Parameters:
NameTypeDescription
namestringEvent name
actionfunctionThe action to execute on event.
Source: