Background
In order to initialize a Chromecast session from my video player, I need to call a method on window.chrome.cast. This works correctly on desktop Chrome, however Android Chrome's window.chrome object does not include the requisite cast field.
I am using a Google Pixel running Android 9. Your advice is appreciated!
The code
Before initializing the Chromecast session, I add a listener on the window that detects whether the Google Chromecast API is available:
window.__onGCastApiAvailable = (isAvailable) => {
if (isAvailable) {
this.initializeCastApi();
}
};
On Android Chrome, isAvailable does not become true and thus the API is never initialized. If I remove the conditional and just run initializeCastApi(), the following line is the first to run in that method:
const sessionRequest = new chrome.cast.SessionRequest(/* App ID */);
On Android, this causes the following error, since window.chrome.cast does not exist:
Uncaught TypeError: Cannot read property 'SessionRequest' of undefined
Expectations vs reality
I expect the Chromecast behavior on Android Chrome to function as it does on desktop Chrome, since the Chromecast API is available on both.
However the window.chrome objects are not the same, and since Android's object does not include cast, I am unable to launch Chromecast on that browser.
Screenshots
The window.chrome object on desktop Chrome (notice the presence of cast):

