feat(mobile): add cast support (#18341)

* initial cast framework complete and mocked cast dialog working

* wip casting

* casting works!

just need to add session key check and remote video controls

* cleanup of classes

* add session expiration checks

* cast dialog now shows connected device at top of list with a list header. Discovered devices are also cached for app session.

* cast video player finalized

* show fullsize assets on casting

* translation already happens on the text element

* remove prints

* fix lintings

* code review changes from @shenlong-tanwen

* fix connect method override

* fix alphabetization

* remove important

* filter chromecast audio devices

* fix some disconnect command ordering issues and unawaited futures

* remove prints

* only disconnect if we are connected

* don't try to reconnect if its the current device

* add cast button to top bar

* format sessions api

* more formatting issues fixed

* add snack bar to tell user that we cannot cast an asset that is not uploaded to server

* make casting icon change to primary color when casting is active

* only show casting snackbar if we are casting

* dont show cast button if asset is remote and we are not casting

* stop playing media if we seek to an asset that is not remote

* remove https check since it works with local http IP addresses

* remove unneeded imports

* fix recasting when socket closes

* fix info plist formatting

* only show cast button if there is an active websocket connection (ie the server is accessible)

* add device capability bitmask checks

* small comment about bitmask
This commit is contained in:
Brandon Wees
2025-06-08 21:55:23 -05:00
committed by GitHub
parent e88eb44aba
commit 5574b2dd39
24 changed files with 1101 additions and 41 deletions
+64
View File
@@ -81,6 +81,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "9.2.0"
bonsoir:
dependency: transitive
description:
name: bonsoir
sha256: "2e2cf3be580deccad9a48dcaddddf90de092e74b7de2015ef58fb24e11d66496"
url: "https://pub.dev"
source: hosted
version: "5.1.11"
bonsoir_android:
dependency: transitive
description:
name: bonsoir_android
sha256: "9a65b6e50c5718c3f1a7ed6ff57ab9ed8ae990ff9c36d2b1ab3d1b90f28f7d1b"
url: "https://pub.dev"
source: hosted
version: "5.1.6"
bonsoir_darwin:
dependency: transitive
description:
name: bonsoir_darwin
sha256: "2d25c70f0d09260be1c2ab583b80dd89cbbfd59997579dadf789c5af00c7b2e4"
url: "https://pub.dev"
source: hosted
version: "5.1.3"
bonsoir_linux:
dependency: transitive
description:
name: bonsoir_linux
sha256: f2639aded6e15943a9822de98a663a1056f37cbfd0a74d72c9eaa941965945c2
url: "https://pub.dev"
source: hosted
version: "5.1.3"
bonsoir_platform_interface:
dependency: transitive
description:
name: bonsoir_platform_interface
sha256: "08bb8b35d0198168b3bce87dbc718e4e510336cff1d97e43762e030c01636d45"
url: "https://pub.dev"
source: hosted
version: "5.1.3"
bonsoir_windows:
dependency: transitive
description:
name: bonsoir_windows
sha256: d4a0ca479d4f3679487a61f3174fb9fe1651e323c778b02dfa630490366be65d
url: "https://pub.dev"
source: hosted
version: "5.1.5"
boolean_selector:
dependency: transitive
description:
@@ -193,6 +241,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
cast:
dependency: "direct main"
description:
name: cast
sha256: de1856e1a31aa60a6fed627f827921f7ec6539c67c60d0c899e89646dcbe773e
url: "https://pub.dev"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
@@ -1404,6 +1460,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.3"
protobuf:
dependency: transitive
description:
name: protobuf
sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
pub_semver:
dependency: transitive
description: