tuhinpal/tplayer.js ? reverse-engineered prompt
Reverse engineered prompt
Build me a flexible HTML5 video player library that makes it easy to play HLS and DASH streams in the browser.
I want it to work with a normal video element, have a simple setup for plain HTML, and also work cleanly in a Next.js app without server side rendering. It should support multiple quality streams, optional captions from WebVTT files, and a simple way to tweak the player colors and styling.
Please also add DRM support for Widevine and PlayReady, including the ability to send custom headers for both the stream requests and the license requests. I need a way to create a player instance, destroy it later, and get the active player back so I can call normal video controls like pause.
Keep the API straightforward, document the main options, and make the default experience work out of the box. If you need to check the current docs for the playback libraries, look them up online and use the latest compatible approach.
Are you gonna build this?
make sure you review the code using coderabbit