videojs / videojs-contrib-eme

Supports Encrypted Media Extensions for playback of encrypted content in Video.js
Other
203 stars 72 forks source link

window.MediaKeys undefined #113

Closed Kelmatou closed 4 years ago

Kelmatou commented 4 years ago

Hi,

I've been investigating on why eme is not working inside my vue nuxt project, but is working on a simple js project. I'm using the same code on both projects to load a protected content.

In the nuxt project, player is initialized, I call this.eme() and at this point eme is initialized, but has 0 session (where the other js project has 1 session) I eventually noticed that window.MediaKeys is undefined, thus making onPlayerReady function in eme code skip all cases and doing nothing.

Is it something I missed? Do you have an idea of what could be the cause of this?

Kelmatou commented 4 years ago

I figured out that window.MediaKeys is available only on https or localhost I was using an alias in etc/hosts and it was not working then