You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason for my asking is that Firefox desktop doesn't support Chromecast.
Presumably, this is also the case for all non-Chromium browsers.
If the following (example) API could be run from a WebExtension..
then it would be easy to write a very capable replacement for Chrome's built-in integration.
Note that because there is currently no browser API to use mDNS discovery,
a static (stateless) "ip" parameter is explicitly passed to each method.
These methods would be equivalent to the following functionality,
which is already available from the command-line:
ip='192.168.0.156'
url='https://example.com/path/to/media.mp4'
seconds='30'
level='0.55'
go-chromecast -a "$ip" status
Idle, volume=0.17 muted=false
go-chromecast -a "$ip" load "$url"
go-chromecast -a "$ip" pause
go-chromecast -a "$ip" unpause
go-chromecast -a "$ip" next
go-chromecast -a "$ip" previous
go-chromecast -a "$ip" rewind "$seconds"
go-chromecast -a "$ip" seek "$seconds"
go-chromecast -a "$ip" mute
go-chromecast -a "$ip" unmute
go-chromecast -a "$ip" volume "$level"
The text was updated successfully, but these errors were encountered:
Actually, I made a bad assumption. I thought that WebAssembly would support TCP sockets, which client-side javascript does not. But I was wrong.
As such, there's no advantage in going down the rabbit hole that I proposed.. and all of the work that it would involve. There are already javascript libraries that could be used, with the assistance of a proxy to bridge between websockets (from the browser) and tcp sockets (to the chromecast). After commenting here, I actually played around with some and made working browser builds:
I should also note that fx_cast, which is the currently accepted workaround for casting from Firefox, requires using a native "bridge" application for this same purpose. This app allows the addon to use mDNS for device discovery and TCP sockets for communication, neither of which can be done by client-side javascript from within the addon using the APIs provided by the browser.
Unfortunately, it doesn't seem that WebAssembly provides any additional capabilities.
The reason for my asking is that Firefox desktop doesn't support Chromecast.
Presumably, this is also the case for all non-Chromium browsers.
If the following (example) API could be run from a WebExtension..
then it would be easy to write a very capable replacement for Chrome's built-in integration.
Note that because there is currently no browser API to use mDNS discovery,
a static (stateless) "ip" parameter is explicitly passed to each method.
These methods would be equivalent to the following functionality,
which is already available from the command-line:
The text was updated successfully, but these errors were encountered: