stopCastingOnAppTerminated property
Whether to automatically stop casting and end the session when the app is killed/terminated.
When set to true, the plugin will automatically call endSessionAndStopCasting()
when the app is terminated (killed by user or system). This ensures the Chromecast
device stops playing when the app is closed.
When set to false (default), casting will continue on the receiver device even
after the app is killed, allowing the user to resume control later.
Note: This works for normal app closure and most system-initiated kills. Force-kills (swipe away from recent apps) may not always trigger this behavior depending on the platform and circumstances.
Implementation
final bool stopCastingOnAppTerminated;