Skip to content

Commit

Permalink
appinio_video_player - version 1.3.0
Browse files Browse the repository at this point in the history
* updating video player

* fix: mute button

* slide to change volume

* increasing gesture area

* fix: size

* upgrade : cache support

* disable pip

* get position

* fix: switch video source

* Update README.md

* Update CHANGELOG.md

* appinio_video_player - version 1.3.0

---------

Co-authored-by: Bilal <[email protected]>
  • Loading branch information
khanmujeeb687 and bilalhamud authored Jan 24, 2024
1 parent 9d79c21 commit 7b33309
Show file tree
Hide file tree
Showing 23 changed files with 376 additions and 167 deletions.
7 changes: 7 additions & 0 deletions packages/appinio_video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.3.0] - 2024.01.24

- Feat: Cache Network Videos
- Feat: Mute or Change volume with swiping on right side of screen.
- Feat: Hide Picture in Picture Mode
- Many other Bug Fixes

## [1.2.2] - 2023.08.23

- Feat: Jump forward and backward like youtube.
Expand Down
4 changes: 4 additions & 0 deletions packages/appinio_video_player/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This package wraps the official video_player package by flutter and extends it w

## Top Features

- [ NEW ] Change voluming with swiping on right side of screen.
- [ NEW ] Mute/Unmute video
- [ NEW ] Hide Picture in Picture Mode on Web
- [ NEW ] Cache Network Video
- Seek forward and backward
- Fullscreen Mode
- Native controls and fullscreen for web apps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package="com.example.example">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:usesCleartextTraffic="true"
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
2 changes: 1 addition & 1 deletion packages/appinio_video_player/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
13 changes: 7 additions & 6 deletions packages/appinio_video_player/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MyHomePage extends StatefulWidget {
}

class _MyHomePageState extends State<MyHomePage> {
late VideoPlayerController _videoPlayerController,
late CachedVideoPlayerController _videoPlayerController,
_videoPlayerController2,
_videoPlayerController3;

Expand All @@ -49,11 +49,11 @@ class _MyHomePageState extends State<MyHomePage> {
void initState() {
super.initState();

_videoPlayerController = VideoPlayerController.network(
_videoPlayerController = CachedVideoPlayerController.network(
longVideo,
)..initialize().then((value) => setState(() {}));
_videoPlayerController2 = VideoPlayerController.network(video240);
_videoPlayerController3 = VideoPlayerController.network(video480);
_videoPlayerController2 = CachedVideoPlayerController.network(video240);
_videoPlayerController3 = CachedVideoPlayerController.network(video480);
_customVideoPlayerController = CustomVideoPlayerController(
context: context,
videoPlayerController: _videoPlayerController,
Expand Down Expand Up @@ -84,6 +84,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
child: SafeArea(
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [
kIsWeb
? Expanded(
Expand Down Expand Up @@ -125,7 +126,7 @@ String video720 =
"https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4";

String video480 =
"https://www.sample-videos.com/video123/mp4/480/big_buck_bunny_480p_10mb.mp4";
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4";

String video240 =
"https://www.sample-videos.com/video123/mp4/240/big_buck_bunny_240p_10mb.mp4";
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4";
110 changes: 39 additions & 71 deletions packages/appinio_video_player/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.2"
version: "1.3.0"
async:
dependency: transitive
description:
Expand All @@ -24,6 +24,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
cached_video_player:
dependency: transitive
description:
name: cached_video_player
sha256: "13c25fc1af3bb239da83d9e965d119463a67a782fd9af3714ed86a1182ded20c"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
characters:
dependency: transitive
description:
Expand All @@ -44,18 +52,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.1"
csslib:
dependency: transitive
description:
name: csslib
sha256: d1cd6d6e4b39a4ad295204722b8608f19981677b223f3e942c0b5a33dcf57ec0
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "0.17.1"
version: "1.18.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -95,22 +95,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
sha256: bfef906cbd4e78ef49ae511d9074aebd1d2251482ef601a280973e8b58b51bbf
url: "https://pub.dev"
source: hosted
version: "0.15.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
lints:
dependency: transitive
description:
Expand All @@ -123,26 +107,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: transitive
description:
Expand All @@ -168,26 +152,26 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -208,10 +192,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.1"
vector_math:
dependency: transitive
description:
Expand All @@ -220,46 +204,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
video_player:
dependency: transitive
description:
name: video_player
sha256: a58a4e5a298db258a848c9e3cb2ca816cab6709e71a9e6b1173dcc258d44da09
url: "https://pub.dev"
source: hosted
version: "2.4.6"
video_player_android:
dependency: transitive
description:
name: video_player_android
sha256: dc6bb9df406e3a4900329cacb45350964aaa6a84d0f3f628bc470a8f7ccafa83
url: "https://pub.dev"
source: hosted
version: "2.3.6"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: d02369f0c9d0f5615a9c2d9a9502fa18765e467bd2cef94f552700b62768dee0
url: "https://pub.dev"
source: hosted
version: "2.3.1"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
sha256: "70ed168346b552f7c366a3d739e114535db67bbb4b3920aab52016dc23838635"
sha256: "318a6d20577e1c78cf0bf40670883cc571ea860c72a4f7426d7dacce4bdd4343"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
version: "5.1.4"
video_player_web:
dependency: transitive
description:
name: video_player_web
sha256: "48de7d5ff19fb474082182c33704c0210c395521ff81e54fa255c7719056fc81"
sha256: fb3bbeaf0302cb0c31340ebd6075487939aa1fe3b379d1a8784ef852b679940e
url: "https://pub.dev"
source: hosted
version: "2.0.15"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "2.0.7"
version: "0.3.0"
sdks:
dart: ">=3.0.0-0 <4.0.0"
flutter: ">=2.10.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.0.0"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library appinio_video_player;

export 'package:video_player/video_player.dart';
export 'package:cached_video_player/cached_video_player.dart';
export 'src/custom_video_player.dart';
export 'src/web_video_player/conditional_native_web_video_player/conditional_native_web_video_player.dart';
export 'src/models/custom_video_player_progress_bar_settings.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:appinio_video_player/src/controls/mute_button.dart';
import 'package:appinio_video_player/src/custom_video_player_controller.dart';
import 'package:flutter/material.dart';
import 'package:appinio_video_player/src/controls/fullscreen_button.dart';
Expand Down Expand Up @@ -26,6 +27,12 @@ class CustomVideoPlayerControlBar extends StatelessWidget {
.customVideoPlayerSettings.controlBarDecoration,
child: Row(
children: [
if (customVideoPlayerController
.customVideoPlayerSettings.showMuteButton)
CustomVideoPlayerMuteButton(
customVideoPlayerController: customVideoPlayerController,
fadeOutOnPlay: fadeOutOnPlay,
),
if (customVideoPlayerController
.customVideoPlayerSettings.showPlayButton)
CustomVideoPlayerPlayPauseButton(
Expand Down
Loading

0 comments on commit 7b33309

Please sign in to comment.