@forlagshuset/v-video-player-vjs

0.2.16 • Public • Published

Customizable VideoPlayer component

Installation

npm install @forlagshuset/v-video-player-vjs

Usage

import FHVideoPlayer from '@forlagshuset/v-video-player-vjs'

export default {
  data() {
    return {
      videoUrl: '',
      videoType: 'video/mp4',
      videoAttributes: {
        poster: '',
        crossorigin: '',
        playsinline: '',
        controls: ''
      },
      captions: [
        {
          label: 'Norwegian Nynorsk',
          srclang: 'nn',
          src: '',
        },
        {
          label: 'Norwegian Bokmål',
          srclang: 'nb',
          src: ''
        }
      ],
      options: {
        playbackRates: [0.5, 1, 1.5, 2],
        language: 'nb'
      }
    }
  },

  components: {
    FHVideoPlayer
  }
}

Props

FHVideoPlayerVJS accepts these props:

  props: {
    videoUrl: {
      type: String,
      default: null,
      required: true
    },
    videoType: {
      type: String,
      default: 'video/mp4'
    },
    videoAttributes: {
      type: Object,
      default: null
    },
    captions: {
      type: Array,
      default: null,
      required: true
    },
    chapters: {
      type: Array
    },
    options: {
      type: Object,
      default: obj => {
        /*
          Available options from VJS: https://docs.videojs.com/tutorial-options.html

          Component specific:
          skipTime: Number
        */
      }
    }
  },

Uses video.js plugin.

Readme

Keywords

none

Package Sidebar

Install

npm i @forlagshuset/v-video-player-vjs

Weekly Downloads

1

Version

0.2.16

License

MIT

Unpacked Size

13 MB

Total Files

27

Last publish

Collaborators

  • kemorian
  • warszk
  • iapain
  • lukaszsiromski
  • daniel.wiadro
  • shardiwal