{
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | body: Container(
19 | child: SimpleVideoPlayer(
20 | widget.url,
21 | isLandscape: true,
22 | videoType: VideoType.net,
23 | )));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Wed Jan 02 19:42:37 CST 2019
8 | ndk.dir=/Users/wyh/android-sdk-macosx/ndk-bundle
9 | sdk.dir=/Users/wyh/android-sdk-macosx
10 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_app
2 | description: A new Flutter application.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # Read more about versioning at semver.org.
10 | version: 1.0.0+1
11 |
12 | environment:
13 | sdk: ">=2.0.0-dev.68.0 <3.0.0"
14 |
15 | dependencies:
16 | flutter:
17 | sdk: flutter
18 |
19 |
20 | # The following adds the Cupertino Icons font to your application.
21 | # Use with the CupertinoIcons class for iOS style icons.
22 | cupertino_icons: ^0.1.2
23 |
24 | http: ^0.12.0+2
25 | html: ^0.14.0+2
26 | flutter_cache_manager: ^0.3.2
27 | cached_network_image: ^0.8.0
28 | # video_player: ^0.8.0
29 | flutter_ijk:
30 | git:
31 | url: https://github.com/jadennn/flutter_ijk
32 | event_bus: ^1.1.0
33 | photo_view: ^0.4.0
34 | video_exo_plugin:
35 | path: video_exo_plugin
36 |
37 | dev_dependencies:
38 | flutter_test:
39 | sdk: flutter
40 |
41 |
42 | # For information on the generic Dart part of this file, see the
43 | # following page: https://www.dartlang.org/tools/pub/pubspec
44 |
45 | # The following section is specific to Flutter.
46 | flutter:
47 |
48 | # The following line ensures that the Material Icons font is
49 | # included with your application, so that you can use the icons in
50 | # the material Icons class.
51 | uses-material-design: true
52 |
53 | # To add assets to your application, add an assets section, like this:
54 | assets:
55 | - images/def_avatar.png
56 | - images/mine_avatar.png
57 | # - images/a_dot_ham.jpeg
58 |
59 | # An image asset can refer to one or more resolution-specific "variants", see
60 | # https://flutter.io/assets-and-images/#resolution-aware.
61 |
62 | # For details regarding adding assets from package dependencies, see
63 | # https://flutter.io/assets-and-images/#from-packages
64 |
65 | # To add custom fonts to your application, add a fonts section here,
66 | # in this "flutter" section. Each entry in this list should have a
67 | # "family" key with the font family name, and a "fonts" key with a
68 | # list giving the asset and other descriptors for the font. For
69 | # example:
70 | # fonts:
71 | # - family: Schyler
72 | # fonts:
73 | # - asset: fonts/Schyler-Regular.ttf
74 | # - asset: fonts/Schyler-Italic.ttf
75 | # style: italic
76 | # - family: Trajan Pro
77 | # fonts:
78 | # - asset: fonts/TrajanPro.ttf
79 | # - asset: fonts/TrajanPro_Bold.ttf
80 | # weight: 700
81 | #
82 | # For details regarding fonts from package dependencies,
83 | # see https://flutter.io/custom-fonts/#from-packages
84 |
--------------------------------------------------------------------------------
/video_exo_plugin/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 | pubspec.lock
7 |
8 | build/
9 |
--------------------------------------------------------------------------------
/video_exo_plugin/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/video_exo_plugin/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/video_exo_plugin/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/video_exo_plugin/README.md:
--------------------------------------------------------------------------------
1 | # video_exo_plugin
2 |
3 | A new Flutter plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter
8 | [plug-in package](https://flutter.io/developing-packages/),
9 | a specialized package that includes platform-specific implementation code for
10 | Android and/or iOS.
11 |
12 | For help getting started with Flutter, view our
13 | [online documentation](https://flutter.io/docs), which offers tutorials,
14 | samples, guidance on mobile development, and a full API reference.
15 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'io.flutter.plugins.videoplayer'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.2.1'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 28
26 |
27 | defaultConfig {
28 | minSdkVersion 16
29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30 | }
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 | android {
35 | compileOptions {
36 | sourceCompatibility 1.8
37 | targetCompatibility 1.8
38 | }
39 | }
40 |
41 | dependencies {
42 |
43 | compileOnly files('libs/flutter.jar')
44 | implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
45 | implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.1'
46 | implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.1'
47 | implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.9.1'
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 17 09:04:56 PDT 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/libs/flutter.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wqandroid/avflutter/e229bb39402127e3194d45c62ea0d2b1209157c1/video_exo_plugin/android/libs/flutter.jar
--------------------------------------------------------------------------------
/video_exo_plugin/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'video_player'
2 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/video_exo_plugin/android/src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins.videoplayer;
2 |
3 | import io.flutter.plugin.common.EventChannel;
4 | import java.util.ArrayList;
5 |
6 | /**
7 | * And implementation of {@link EventChannel.EventSink} which can wrap an underlying sink.
8 | *
9 | * It delivers messages immediately when downstream is available, but it queues messages before
10 | * the delegate event sink is set with setDelegate.
11 | *
12 | *
This class is not thread-safe. All calls must be done on the same thread or synchronized
13 | * externally.
14 | */
15 | final class QueuingEventSink implements EventChannel.EventSink {
16 | private EventChannel.EventSink delegate;
17 | private ArrayList