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

Nuxt: binded values in the data-setup of video element are not updating #86

Open
pnijhara opened this issue May 18, 2022 · 1 comment
Open

Comments

@pnijhara
Copy link

I am using nuxt 2 and passing video metadata to data-setup as shown below:

<video ref="videoPlayer" class="video-js vjs-theme-forest" :data-setup=metaData></video>


export default{
  data() {
    videos: [],     // array of all the video objects with video options
    metaData: null,
    player: null
  }
  mounted() {
   this.currentVideo = this.videos[0];
    this.metaData = JSON.stringify({
      "plugins": {
        "httpSourceSelector": {},
        "mux": {
          "data": {
            "env_key": this.$config.muxEnvKey,
            "video_title": "my great video",
          }
        }
      }
    })
  this.player = videojs(this.$refs.videoPlayer, this.videos[0])
 }
}

I don't see any problem with the code. However, still, data-setup is not able to use the updated value of metaData.

@gkatsev
Copy link
Contributor

gkatsev commented May 18, 2022

Are you able to share a live example on a site like codesandbox.io?

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

2 participants