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)
This commit is contained in:
Jason Simmons 2020-11-12 12:07:13 -08:00 committed by GitHub
parent f8d2f58b52
commit b20a9f8170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,11 +360,15 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix
final VideoPlayerController butterflyController = VideoPlayerController.asset(
'videos/butterfly.mp4',
package: 'flutter_gallery_assets',
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
);
// TODO(sigurdm): This should not be stored here.
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>();
bool isSupported = true;