Unverified Commit b20a9f81 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Set the mixWithOthers option in the Gallery video demo (#70396)

This allows the two videos in the demo to play simultaneously
(matching the behavior from before the recent upgrade to the
video player plugin)
parent f8d2f58b
...@@ -360,11 +360,15 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix ...@@ -360,11 +360,15 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix
final VideoPlayerController butterflyController = VideoPlayerController.asset( final VideoPlayerController butterflyController = VideoPlayerController.asset(
'videos/butterfly.mp4', 'videos/butterfly.mp4',
package: 'flutter_gallery_assets', package: 'flutter_gallery_assets',
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
); );
// TODO(sigurdm): This should not be stored here. // TODO(sigurdm): This should not be stored here.
static const String beeUri = 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4'; static const String beeUri = 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4';
final VideoPlayerController beeController = VideoPlayerController.network(beeUri); final VideoPlayerController beeController = VideoPlayerController.network(
beeUri,
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
);
final Completer<void> connectedCompleter = Completer<void>(); final Completer<void> connectedCompleter = Completer<void>();
bool isSupported = true; bool isSupported = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment