Unverified Commit 7010bd41 authored by Sarah Zakarias's avatar Sarah Zakarias Committed by GitHub

Play butterfly video from asset instead of network (#16269)

parent 2fa8baad
......@@ -9,10 +9,7 @@ import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
import 'package:device_info/device_info.dart';
// TODO(sigurdm): These should not be stored here.
const String butterflyUri =
'https://flutter.github.io/assets-for-api-docs/videos/butterfly.mp4';
// TODO(sigurdm): This should not be stored here.
const String beeUri =
'https://flutter.github.io/assets-for-api-docs/videos/bee.mp4';
......@@ -354,10 +351,12 @@ Future<bool> isIOSSimulator() async {
class _VideoDemoState extends State<VideoDemo>
with SingleTickerProviderStateMixin {
final VideoPlayerController butterflyController = new VideoPlayerController(
butterflyUri,
);
final VideoPlayerController beeController = new VideoPlayerController(
final VideoPlayerController butterflyController =
new VideoPlayerController.asset(
'videos/butterfly.mp4',
package: 'flutter_gallery_assets',
);
final VideoPlayerController beeController = new VideoPlayerController.network(
beeUri,
);
......
......@@ -9,7 +9,7 @@ dependencies:
string_scanner: 1.0.2
url_launcher: 3.0.0
cupertino_icons: 0.1.1
video_player: 0.3.0
video_player: 0.4.0
# Also update dev/benchmarks/complex_layout/pubspec.yaml
flutter_gallery_assets:
......@@ -79,6 +79,7 @@ flutter:
uses-material-design: true
assets:
- lib/gallery/example_code.dart
- packages/flutter_gallery_assets/videos/butterfly.mp4
- packages/flutter_gallery_assets/animated_flutter_lgtm.gif
- packages/flutter_gallery_assets/animated_flutter_stickers.webp
- packages/flutter_gallery_assets/appbar_background.jpg
......
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