My code still exists in the desktop source[1] but essentially what you need to do is convert an srt to vtt [2] file and start a local http server that will serve the VTT file [3] and point the Chromecast to that
Not Popcorn Time, but I've had great experience using Airflow (airflow.app) for streaming video to Chromecast. Among other things, it handles subtitles quite well.
[1] - https://github.com/popcorn-official/popcorn-desktop/blob/dev...
[2] - https://github.com/popcorn-official/popcorn-desktop/blob/dev...
[3] - https://github.com/popcorn-official/popcorn-desktop/blob/dev...