How to use the plyr function in plyr

To help you get started, we’ve selected a few plyr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexusmai / vue-laravel-file-manager / src / components / modals / views / VideoPlayer.vue View on Github external
mounted() {
    // initiate video player
    this.player = new Plyr(this.$refs.fmVideo);
    // load source
    this.player.source = {
      type: 'video',
      title: this.videoFile.filename,
      sources: [{
        src: `${this.$store.getters['fm/settings/baseUrl']}stream-file?disk=${this.selectedDisk}&path=${encodeURIComponent(this.videoFile.path)}`,
        type: `audio/${this.videoFile.extension}`,
      }],
    };
  },
  beforeDestroy() {
github krestaino / prankstr / app / src / App.vue View on Github external
mounted () {
    // eslint-disable-next-line
    new Plyr('audio', {
      controls: this.options
    })
  }
}
github fusioncms / fusioncms / fusion / resources / js / views / FileManager / Show.vue View on Github external
this.$nextTick(() => {
                        this.player = new Plyr(this.$refs.player, {
                            title: this.file.name,
                            ratio: '16:9',
                            controls: [
                                'play-large',   // The large play button in the center
                                'restart',      // Restart playback
                                'play',         // Play/pause playback
                                'progress',     // The progress bar and scrubber for playback and buffering
                                'current-time', // The current time of playback
                                'duration',     // The full duration of the media
                                'mute',         // Toggle mute
                                'volume',       // Volume control
                                'captions',     // Toggle captions
                                'settings',     // Settings menu
                                'pip',          // Picture-in-picture (currently Safari only)
                                'airplay',      // Airplay (currently Safari only)
                                'fullscreen',   // Toggle fullscreen
github ctf0 / Laravel-Media-Manager / src / resources / assets / js / modules / media_player.js View on Github external
let t = setInterval(() => {
                    let item = document.querySelector('[data-player]')

                    if (item) {
                        let plr = this.player.item = new Plyr(item, options)

                        // status
                        plr.on('playing', (e) => {
                            this.player.playing = true
                        })
                        plr.on('pause', (e) => {
                            this.player.playing = false
                        })

                        // fs
                        plr.on('enterfullscreen', (e) => {
                            this.player.fs = true
                            document.querySelector('[data-plyr="fullscreen"]').blur()
                        })
                        plr.on('exitfullscreen', (e) => {
                            this.player.fs = false
github redxtech / vue-plyr / src / VuePlyr.vue View on Github external
mounted () {
      this.player = new Plyr(this.$el.firstChild, this.opts)
      this.$emit('player', this.player)
      this.emit.forEach(element => {
        this.player.on(element, this.emitPlayerEvent)
      })
    },
    beforeDestroy () {
github jMavarez / Tana / src / js / renderer / portal-2.js View on Github external
function setupPlyr(el) {
    let player = new Plyr(el, {
      debug: !IS_PRODUCTION,
      controls:
        ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions']
      ,
      fullscreen: {
        enabled: false
      },
      storage: {
        enabled: true,
        key: 'tana'
      }
    });
  }
github jMavarez / Tana / src / js / renderer / portal.js View on Github external
function setupPlyr(el) {
    let player = new Plyr(el, {
      debug: !IS_PRODUCTION,
      controls:
        ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions']
      ,
      fullscreen: {
        enabled: false
      },
      storage: {
        enabled: true,
        key: 'tana'
      }
    });
  }

plyr

A simple, accessible and customizable HTML5, YouTube and Vimeo media player

MIT
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis