Video View

This content view is represented by video value for the field type. The video for the video player can be sourced from a local source (as part of the App package) or from a remote source. This is identified by the sourceType field value. The image source is represented by the field source.

Following are the possible values of sourceType field:

  • "remote" -- identifies that the source is a remote url

  • "local" -- identifies that the source is an application bundled video file source.

  • missing sourceType defaults to remote

Following example shows a video content view:

{
    "type": "video",
    "source": "https://storage.googleapis.com/exoplayer-test-media-0/BigBuckBunny_320x180.mp4",
    "height": 480,
    "autoplay": true,
    "showPlaybackControls": true
}

Video Scaling Mode

Video Content Views support scaling mode with the field scalingMode. The scalingMode field can have the following values:

  • "scaledToFill" -- scales the video to fill its parent, maintaining it's aspect ratio

  • "scaledToFit" -- scales the video to fit its parent, maintaining it's aspect ratio

Scaling Dimensions

Apart from trying to fit or fill the video to its parent view, a video can be rendered to a specific width / height. Appstent CMS supports adding width and/or height fields to the video view content. As video's aspect ratio is always maintained, specifying either width or height suffices in most cases.

Video Player Properties

Video Content Views can be customized with the following playback properties:

  • "autoplay" -- a boolean field representing whether the video should be started as soon as it is rendered on the screen for the first time.

  • "showPlaybackControls" -- a boolean field representing whether the video player should show playback controls or not.

  • "autoLoop" -- a boolean field representing whether the video should loop back to beginning once its completed.

Last updated