Configuration

Configuration

Playback Options

OptionTypeDescription
sourcestringAn URL to the source of the video.
preloadauto | metadata | noneHint about what content to load before video is played.
loopboolIf specified, the player will automatically seek back to the start upon reaching the end of the video.
autoPlayboolIndicates that the video should start playing as soon as it's ready.
playsInlineboolIndicates that the video is to be played "inline", within the element's playback area.
mutedboolIndicates the default setting of the audio contained in the video. If set, the audio will be initially silenced.
startTimenumberTime in seconds where you would like the video to start from.
volumenumberIndicates the starting volume of the player.
crossoriginanonymous | use-credentialsIndicates whether to use CORS to fetch the related video.
posterstringA URL for an image to be shown while the video is downloading.
aspectRationumberAspect ratio you would like the player to maintain.

Usage

<!-- Element to attach VXDK -->
<div id="vxdk"></div>
 
<script>
  const options = {
    source: "https://url-to/video",
    preload: "metadata",
    loop: false,
  };
 
  document.addEventListener("DOMContentLoaded", () => {
    const el = document.getElementById("vxdk");
    const vxdk = Vxdk.init(el, options);
  });
</script>