devcshort / react-hls

Simple React component for playing hls/rtmp live streams.
https://www.npmjs.com/package/react-hls-player
MIT License
118 stars 48 forks source link

Multiple audio tracks not supported #43

Open jonattasts opened 2 years ago

jonattasts commented 2 years ago

As it would be possible to access and manipulate a hls video with multiple audios, I can only access and manipulate subtitles, but I need to access and change the audios (languages) of the m3u8 video. In the following example there are no audio tracks in the player reference.

image

IlyaLekomtzev commented 2 years ago

@jonatasts Hello, did you manage to solve the problem?

jonattasts commented 2 years ago

I had to use only Hls.js to wrap the pure HTML video and with it I had access to the audio and subtitles interface to allow the management of both

IlyaLekomtzev commented 2 years ago

@jonatasts Thanks

IlyaLekomtzev commented 2 years ago

@jonatasts We would be grateful if you would give examples.

jonattasts commented 2 years ago

Unfortunately I don't have access to the codes anymore, but I added a ref to the HTML video tag and followed the Hls.js doc to index the video's URL and handle the events and properties needed to exchange audio and subtitles.

IlyaLekomtzev commented 2 years ago

@jonatasts Thanks anyway