Update to the actual cast api
Handle when player closes