How does the "chromecast" work as you described? Is it just DLNA/DIAL?
I just created a new project actually for this and Im about to add this to homebrew for easy install but you can already build this locally and add it to your tv with the scripts in the project
https://codeberg.org/nobunaga/LoLCast