diff --git a/android/app/build.gradle b/android/app/build.gradle index 28674af..c9ee68b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -58,8 +58,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 20 targetSdkVersion 33 - versionCode 1 - versionName "1.0.0" + versionCode 2 + versionName "1.5.0" multiDexEnabled true } signingConfigs { diff --git a/lib/pages/channelpage-iptv.dart b/lib/pages/channelpage-iptv.dart index 21f8ad6..9a7b277 100644 --- a/lib/pages/channelpage-iptv.dart +++ b/lib/pages/channelpage-iptv.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:video_player/video_player.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; import 'package:digilogtv/services/storage.dart'; @@ -49,6 +50,7 @@ class _ChannelPageIPTVState extends State { @override void initState() { super.initState(); + WakelockPlus.enable(); _videoPlayerController = VideoPlayerController.networkUrl( Uri.parse(storage.channels.channelList[index].link)) ..initialize().then((_) { @@ -59,6 +61,7 @@ class _ChannelPageIPTVState extends State { @override void dispose() async { + WakelockPlus.disable(); SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); _videoPlayerController.dispose(); diff --git a/lib/pages/channelpage-youtube.dart b/lib/pages/channelpage-youtube.dart index 46ecc89..b34301a 100644 --- a/lib/pages/channelpage-youtube.dart +++ b/lib/pages/channelpage-youtube.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; import 'package:digilogtv/services/storage.dart'; @@ -28,10 +29,12 @@ class _ChannelPageYouTubeState extends State { @override void initState() { super.initState(); + WakelockPlus.enable(); } @override void dispose() { + WakelockPlus.disable(); SystemChrome.setPreferredOrientations(DeviceOrientation.values); super.dispose(); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 724bb2a..38f4a28 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,12 @@ import FlutterMacOS import Foundation +import package_info_plus import shared_preferences_foundation +import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) } diff --git a/metadata/en-US/changelogs/1.5.0.txt b/metadata/en-US/changelogs/1.5.0.txt new file mode 100644 index 0000000..51b7ee0 --- /dev/null +++ b/metadata/en-US/changelogs/1.5.0.txt @@ -0,0 +1 @@ +* Resolved issue with screen turning off during video playback diff --git a/pubspec.lock b/pubspec.lock index 5d46570..86a71da 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -193,6 +193,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + dbus: + dependency: transitive + description: + name: dbus + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" + source: hosted + version: "0.7.8" fake_async: dependency: transitive description: @@ -304,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" + source: hosted + version: "1.1.0" http_multi_server: dependency: transitive description: @@ -424,6 +440,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" path: dependency: transitive description: @@ -717,6 +749,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.15" + wakelock_plus: + dependency: "direct main" + description: + name: wakelock_plus + sha256: aac3f3258f01781ec9212df94eecef1eb9ba9350e106728def405baa096ba413 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + wakelock_plus_platform_interface: + dependency: transitive + description: + name: wakelock_plus_platform_interface + sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385" + url: "https://pub.dev" + source: hosted + version: "1.1.0" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a729533..6fbb25d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: digilogtv description: A free and open-source TV news app, inspired by Linux Mint's Hypnotix. publish_to: 'none' -version: 1.0.0 +version: 1.5.0 environment: sdk: '>=3.1.0 <4.0.0' @@ -17,6 +17,7 @@ dependencies: mobx_codegen: ^2.3.0 shared_preferences: ^2.2.0 video_player: ^2.7.1 + wakelock_plus: ^1.1.1 dev_dependencies: flutter_test: