Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7010bd41
Unverified
Commit
7010bd41
authored
Apr 05, 2018
by
Sarah Zakarias
Committed by
GitHub
Apr 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Play butterfly video from asset instead of network (#16269)
parent
2fa8baad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
video_demo.dart
examples/flutter_gallery/lib/demo/video_demo.dart
+7
-8
pubspec.yaml
examples/flutter_gallery/pubspec.yaml
+2
-1
No files found.
examples/flutter_gallery/lib/demo/video_demo.dart
View file @
7010bd41
...
...
@@ -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
,
);
...
...
examples/flutter_gallery/pubspec.yaml
View file @
7010bd41
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment