Check the video is playing both sound and video of the correct film and both the begining and the end of the play bar. The video should open, full screen the size of the open window. If you want to download that movie, open a new tab, paste the file or link in the address bar and hit enter. right click on it, select copy link, paste in to the source link bar in this API and play play through your chromecast on your tv. The best way to look for a video to cast with this API, is 123movies, find a movie you like (the adverts are annoying but keep closing them and you will get your movie) get your movie playing on mirror 3, right click the page near the video player click inspect, click on network, select media, and look for a file name or link that has a video file format at the end of it. It took me the whole day to figure out this API There is no problem with this API per say, it's just tricky to use it if you don't know what your doing. My entire collection of Disiney Films is AVI, I can only watch them on the laptop till I find a diffrent app to use.
Make sure your video is MP3 or MP4 before casting, otherwise either remux the video or use a diffrent casting app.
Correction, this JS API does not support many common file types including AVI file.