I want to implement HLS playback using rails, react-player and hls.js.

Asked 2 years ago, Updated 2 years ago, 409 views

With rails at the back end and react/typescript at the front, we would like to implement the streaming playback feature using react-player and hls.js.

Currently, I use a video tag to retrieve mp4 from Amazon S3 via cloudfront and play it.

The react-player may also be compatible with hls.js, but the image of the implementation does not appear.
I would appreciate it if you could give me some helpful examples.

javascript reactjs typescript video hls

2022-11-08 16:46

1 Answers

react-player uses hls.js internally.Download and invoke hls.js from the CDN as needed.

If you want to change the hls.js settings, you can configure file.hlsOptions in Config prop.


2022-11-08 19:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.