Skip to content

Video

wiz-video is a powerful video playback component for (e-Detailers and emails) that supports several video sources (YouTube, Brightcove, eWizard-hosted files, or local files).

The wiz-video component features automatic video type detection, customizable posters and play icons, various shape options (rectangle, circle, square), and comprehensive playback controls. It intelligently adapts its rendering based on the delivery channel, ensuring optimal compatibility and user experience across all platforms.

The cross-channel video component has the following key features:

  • Multi-format support (MP4, MOV).

  • YouTube, Brightcove, hosted, and locally (in the content item) stored video support.

  • Customizable poster images and play icons.

  • Shape options: rectangle, circle, square.

  • Playback controls and options (autoplay, loop, mute, fullscreen).

  • Email-compatible rendering with clickable thumbnails.

  • Comprehensive playback event tracking (play, pause, ended, timeupdate).

Installation

The wiz-video component is part of the eWizard.js component library. To install it to your project, run the following command in the terminal:

bash
wiz install @component/wiz-video

Register the component globally in your application or import it in your Vue template.

Properties

The wiz-video component has the following properties:

PropertyTypeDefaultDescription
componentNameString'Video'Display name for the component in eWizard Editor.
videoString''URL to a video file (supports MP4, WEBM, AVI, MOV, MKV, FLV, WMV, OGG formats).
linkString''URL to YouTube, Brightcove, or eWizard-hosted video.
alternativeTextString'Video'Alternative text description for accessibility.
shapeString'rectangle'Video container shape: 'rectangle', 'circle', or 'square'.
controlsBooleantrueShow native video controls (Only applies to e-Detailers).
autoplayBooleanfalseAutomatically start playing when the slide opens (Only applies to e-Detailers).
fullScreenBooleanfalsePlay video in fullscreen mode (available only for local video files in e-Detailers).
loopBooleanfalseLoop the video when it ends (Only applies to e-Detailers).
mutedBooleantrueMute audio by default (Only applies to e-Detailers).
playsinlineBooleantruePlay video inline on mobile devices instead of fullscreen (Only applies to e-Detailers).
playingDurationNumber0Maximum duration in seconds for video playback (Only applies to e-Detailers).
posterStringdefault-poster.pngCustom poster image URL displayed before playback starts.
showPosterBooleantrueShow or hide the poster image (Only applies to e-Detailers).
playIconStringplayIcon.svgCustom play icon image URL.
showPlayIconBooleantrueShow or hide the play icon overlay.
alignString'left'Content alignment: 'left', 'center', or 'right'.

Custom events

The wiz-video component emits the following custom events for interaction tracking and custom behavior:

EventPayloadDescription
playNoneEmitted when video playback starts.
pauseNoneEmitted when video is paused.
endedNoneEmitted when video playback ends or playing duration limit is reached.
loadNoneEmitted when the video resource has been loaded successfully.
timeupdateNumberEmitted as the video plays, with the current playback time in seconds.

Channel-specific behavior

The cross-channel video component adapts its rendering and functionality based on the content item context.

  • Full native HTML5 video controls available.

  • Support for iFrame-based embeds (YouTube, Brightcove).

  • Full video element with playback controls.

  • Automatic fullscreen capability for local files.

  • Shape constraints applied with CSS (circle and square maintain aspect ratio).

Usage examples

Basic YouTube video

vue
<wiz-video
  link="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  poster="path/to/poster.jpg"
  shape="rectangle"
/>

Circular video with local file

vue
<wiz-video
  video="path/to/video.mp4"
  :autoplay="false"
  shape="circle"
  :controls="true"
  :muted="true"
/>

Square video with limited playback duration

vue
<wiz-video
  link="https://youtu.be/dQw4w9WgXcQ"
  shape="square"
  :playingDuration="30"
  :loop="true"
  @ended="onVideoEnded"
/>

Listening to video events

vue
<wiz-video
  video="path/to/video.mp4"
  @play="handlePlay"
  @pause="handlePause"
  @timeupdate="handleTimeUpdate"
  @ended="handleEnded"
/>
javascript
export default {
  methods: {
    handlePlay() {
      console.log('Video started playing');
    },
    handlePause() {
      console.log('Video paused');
    },
    handleTimeUpdate(currentTime) {
      console.log(`Current playback time: ${currentTime}s`);
    },
    handleEnded() {
      console.log('Video playback ended');
    }
  }
}

Technical notes

  • The component automatically detects video source type through URL validation (YouTube URLs, Brightcove URLs, or video file extensions).

  • YouTube video IDs are extracted automatically from various YouTube URL formats.

  • The component prevents playback during editing.