matvp91 / shaka-player-react

A simple React component wrapper for shaka-player
MIT License
110 stars 34 forks source link

Access shaka.net.NetworkingEngine from interface #14

Closed maradelynie closed 3 years ago

maradelynie commented 3 years ago

I see we have access to UI, player and HTML element, but I need to setup Parameter Authentication on shaka.net and I could not find a way to do so. There is a workaround your it needs to be implemented?

matvp91 commented 3 years ago

Could you elaborate a bit more on "Parameter Authentication" and what your usecase is?

Edit: In case you want to access the shaka namespace, it's best to import it. shaka-player-react is merely a wrapper around shaka's player & UI API.

import shaka from 'shaka-player';
import ShakaPlayer from 'shaka-player-react';

// Setup your ShakaPlayer component.

shaka-player-react does not mark shaka-player as a peer dependency but as a regular dependency. This might cause conflict in the long run. There's a high chance that shaka-player will become a peer dependency in the future, thus requiring your project to add it as a dependency, which this project piggybacks on.

maradelynie commented 3 years ago

Thanks, it's working perfectly.