Skip to content

Commit

Permalink
[player] gestures to offline player; remove loca dep as useless now
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightDV committed Dec 30, 2024
1 parent 114381a commit 8ec8264
Show file tree
Hide file tree
Showing 277 changed files with 33 additions and 23,486 deletions.
8 changes: 6 additions & 2 deletions lib/helpers/custom_player_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ class CustomControls extends StatefulWidget {
///Controls config
final BetterPlayerControlsConfiguration controlsConfiguration;

///Video title
final String? title;

const CustomControls({
Key? key,
required this.onControlsVisibilityChanged,
required this.controlsConfiguration,
this.title,
}) : super(key: key);

@override
Expand Down Expand Up @@ -233,13 +237,13 @@ class _CustomControlsState extends BetterPlayerControlsState<CustomControls> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (_controlsConfiguration.title != null)
if (widget.title != null)
Padding(
padding: const EdgeInsets.only(left: 8, right: 8),
child: SizedBox(
width: MediaQuery.of(context).size.width - 56,
child: Text(
_controlsConfiguration.title!,
widget.title!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
Expand Down
28 changes: 19 additions & 9 deletions lib/helpers/news.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2187,21 +2187,31 @@ class _BetterPlayerVideoPlayerState extends State<BetterPlayerVideoPlayer> {
widget.videoUrls['file'],
);

BetterPlayerControlsConfiguration controlsConfiguration =
BetterPlayerControlsConfiguration(
enableAudioTracks: false,
enableSubtitles: false,
overflowModalColor: widget.primaryColor,
overflowMenuIconsColor: useDarkMode ? Colors.white : Colors.black,
overflowModalTextColor: useDarkMode ? Colors.white : Colors.black,
showControlsOnInitialize: false,
enableQualities: false,
);

BetterPlayerConfiguration betterPlayerConfiguration =
BetterPlayerConfiguration(
autoPlay: widget.autoplay,
allowedScreenSleep: false,
autoDetectFullscreenDeviceOrientation: true,
fit: BoxFit.contain,
controlsConfiguration: BetterPlayerControlsConfiguration(
enableAudioTracks: false,
enableSubtitles: false,
overflowModalColor: widget.primaryColor,
overflowMenuIconsColor: useDarkMode ? Colors.white : Colors.black,
overflowModalTextColor: useDarkMode ? Colors.white : Colors.black,
showControlsOnInitialize: false,
enableQualities: false,
title: widget.videoUrls['name'],
customControlsBuilder: (controller, onPlayerVisibilityChanged) =>
CustomControls(
onControlsVisibilityChanged: onPlayerVisibilityChanged,
controlsConfiguration: controlsConfiguration,
title: widget.videoUrls['name'],
),
playerTheme: BetterPlayerTheme.custom,
),
placeholder: _buildVideoPlaceholder(),
showPlaceholderUntilPlay: true,
Expand Down Expand Up @@ -2269,7 +2279,6 @@ class _BetterPlayerVideoPlayerState extends State<BetterPlayerVideoPlayer> {
),
]
: [],
title: widget.videoUrls['name'],
);

BetterPlayerConfiguration betterPlayerConfiguration =
Expand All @@ -2283,6 +2292,7 @@ class _BetterPlayerVideoPlayerState extends State<BetterPlayerVideoPlayer> {
CustomControls(
onControlsVisibilityChanged: onPlayerVisibilityChanged,
controlsConfiguration: controlsConfiguration,
title: widget.videoUrls['name'],
),
playerTheme: BetterPlayerTheme.custom,
),
Expand Down
13 changes: 7 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,10 @@ packages:
dependency: transitive
description:
name: flutter_widget_from_html_core
sha256: b1048fd119a14762e2361bd057da608148a895477846d6149109b2151d2f7abf
sha256: cc1d9be3d187ce668ee02091cd5442dfb050cdaf98e0ab9a4d12ad008f966979
url: "https://pub.dev"
source: hosted
version: "0.15.2"
version: "0.14.12"
fluttertoast:
dependency: "direct main"
description:
Expand Down Expand Up @@ -803,10 +803,11 @@ packages:
river_player:
dependency: "direct main"
description:
path: river_player
relative: true
source: path
version: "0.1.4"
name: river_player
sha256: "0a64cd278a632abf4bbb39460a631a7d62d75f267a836967789bd2370df2dd9d"
url: "https://pub.dev"
source: hosted
version: "0.1.3"
rxdart:
dependency: transitive
description:
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ dependencies:
git:
url: https://github.com/Nahrawene-ben-hmida/receive_sharing_intent.git
ref: "6ad8f582d7bc7e2fd5a258399e7dbe8c39245d32"
river_player:
path: ./river_player
river_player: 0.1.3
share_plus: ^9.0.0
# signalr_flutter: ^0.2.0 # uses (non-foss?) .jar
sliding_up_panel: ^2.0.0+1
Expand Down
43 changes: 0 additions & 43 deletions river_player/.github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions river_player/.github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

22 changes: 0 additions & 22 deletions river_player/.github/workflows/publish.yml

This file was deleted.

76 changes: 0 additions & 76 deletions river_player/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions river_player/.metadata

This file was deleted.

1 change: 0 additions & 1 deletion river_player/.pubignore

This file was deleted.

31 changes: 0 additions & 31 deletions river_player/CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 8ec8264

Please sign in to comment.