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

El HTMLMediaElement pasado a createMediaElementSource tiene un recurso de origen cruzado, el nodo emitirá silencio. #91

Open
ChileNetwork opened this issue Feb 1, 2022 · 2 comments

Comments

@ChileNetwork
Copy link

ChileNetwork commented Feb 1, 2022

I am having problem with cross-origin when i use tag in my vuejs component:

When i press play button, there is a message at console browser saying:
El HTMLMediaElement pasado a createMediaElementSource tiene un recurso de origen cruzado, el nodo emitirá silencio.

It comes from :
webpack:///node_modules/vue-audio-visual/src/components/AvBase.js line 147:

/**

  • Set audio context analyser.
    */
    setAnalyser: function () {
    this.audioCtx = this.audioCtx || new AudioContext()
    this.analyser = this.analyser || this.audioCtx.createAnalyser()
    const src = this.audioCtx.createMediaElementSource(this.audio)

    src.connect(this.analyser)
    this.analyser.fftSize = this.fftSize
    this.analyser.connect(this.audioCtx.destination)
    },
    any idea what could be?
    Thanks

@ChileNetwork ChileNetwork changed the title Hi there... El HTMLMediaElement pasado a createMediaElementSource tiene un recurso de origen cruzado, el nodo emitirá silencio. Feb 1, 2022
@patriciodilet
Copy link

same issue here

@staskobzar
Copy link
Owner

the original comment is for plugin v2. In v2 there were a component props parameter cors-anonym that is supposed true to solve it.
In new ver 3+ there is composables API should be used to have direct control over audio element.
For example: https://github.com/staskobzar/vue-audio-visual/blob/master/src/components/AVLine.vue

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

3 participants