@donkeyclip/webcomponent
v1.18.1
Published
Donkeyclip Webcomponent Wrapper
Downloads
35
Readme
Usage
Please import the following script once in your page
<script scr="https://cdn.jsdelivr.net/npm/@donkeyclip/webcomponent"></script>
Then you can use our webcomponent:
<donkey-clip
id="<your-clip's-id>"
controls
definition='your-definition'
initparams='your-init-params-as-a-stringified-json'>
</donkey-clip>
Available Attributes and Properties
id
: The ID of the donkeyclip you want to use.height
(optional): The height of the video player in pixels or percentage. If not provided, the player will default to the height of its parent container.width
(optional): The width of the video player in pixels or percentage. If not provided, the player will default to the width of its parent container.scaletofit
(optional): A boolean or string value that, when set totrue
, scales the clip to fit the player dimensions.mcversion
(optional): A string specifying the version of the MotorCortex library to use.playerversion
(optional): A string specifying the version of the Donkeyclip Player library to use.theme
(optional): APlayerTheme
that sets the player's theme. Read more hereinitparams
(optional): An stringified object containing the initParams for initializing the clip.visible
(optional): A string value"always"
indicating that the player should always be visible.ms
(optional): A number or string value representing the millisecond at which the clip should start playing.definition
(optional): ADefinition
stringified object or a string containing the JSON representation of aDefinition
stringified object.volume
(optional): A number or string value representing the volume level of the clip.speed
(optional): A number or string value representing the playback speed of the clip.backgroundcolor
(optional): A string value representing the background color of the player.spinnercolor
(optional): A string value representing the color of the loading spinner.metadata
(optional): ADonkeyClipMetadata
stringified object containing metadata about the clip.