Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config HLS plugin as global #9

Open
munirot opened this issue Aug 10, 2020 · 0 comments
Open

config HLS plugin as global #9

munirot opened this issue Aug 10, 2020 · 0 comments

Comments

@munirot
Copy link

munirot commented Aug 10, 2020

As your document only mention how to import this plugin in component, how to config it as global?

in my main.js

import Vue from 'vue'
import VueCoreVideoPlayer from 'vue-core-video-player'
import HLSCore from '@core-player/playcore-hls'

Vue.use(VueCoreVideoPlayer)
Vue.use({HLSCore})

in my component

<template>
  <div id="app">
    <div class="player-container">
      <vue-core-video-player :core="HLSCore" src="your_file.m3u8"></vue-core-video-player>
    </div>
  </div>
</template>
<script>

export default {
  name: 'App',
  data () {
    return {
      HLSCore
    }
  }
}
</script>

this is the error I got

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant