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.
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.
© 2025 OneMinuteCode. All rights reserved.