Skip to content

Commit

Permalink
fix: video player infinite loading fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
AKACHI-4 committed Jul 7, 2024
1 parent 90efab3 commit c98c9c3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 66 deletions.
7 changes: 5 additions & 2 deletions lib/src/common_widgets/video_player_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class VideoPlayerPage extends StatelessWidget {
);
}

YoutubePlayerController _controller = YoutubePlayerController(
YoutubePlayerController controller = YoutubePlayerController(
initialVideoId: videoId,
flags: const YoutubePlayerFlags(
autoPlay: true,
Expand All @@ -34,13 +34,16 @@ class VideoPlayerPage extends StatelessWidget {
),
body: Center(
child: YoutubePlayer(
controller: _controller,
controller: controller,
showVideoProgressIndicator: true,
progressIndicatorColor: Colors.blueAccent,
progressColors: const ProgressBarColors(
playedColor: Colors.blue,
handleColor: Colors.blueAccent,
),
onReady: () {
controller.addListener(() {});
},
),
),
);
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import firebase_analytics
import firebase_auth
import firebase_core
import firebase_crashlytics
import flutter_inappwebview_macos
import google_sign_in_ios
import path_provider_foundation
import sqflite
Expand All @@ -23,7 +22,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
Expand Down
64 changes: 4 additions & 60 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -346,58 +346,10 @@ packages:
dependency: "direct main"
description:
name: flutter_inappwebview
sha256: "3e9a443a18ecef966fb930c3a76ca5ab6a7aafc0c7b5e14a4a850cf107b09959"
sha256: d198297060d116b94048301ee6749cd2e7d03c1f2689783f52d210a6b7aba350
url: "https://pub.dev"
source: hosted
version: "6.0.0"
flutter_inappwebview_android:
dependency: transitive
description:
name: flutter_inappwebview_android
sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421
url: "https://pub.dev"
source: hosted
version: "1.0.13"
flutter_inappwebview_internal_annotations:
dependency: transitive
description:
name: flutter_inappwebview_internal_annotations
sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter_inappwebview_ios:
dependency: transitive
description:
name: flutter_inappwebview_ios
sha256: f363577208b97b10b319cd0c428555cd8493e88b468019a8c5635a0e4312bd0f
url: "https://pub.dev"
source: hosted
version: "1.0.13"
flutter_inappwebview_macos:
dependency: transitive
description:
name: flutter_inappwebview_macos
sha256: b55b9e506c549ce88e26580351d2c71d54f4825901666bd6cfa4be9415bb2636
url: "https://pub.dev"
source: hosted
version: "1.0.11"
flutter_inappwebview_platform_interface:
dependency: transitive
description:
name: flutter_inappwebview_platform_interface
sha256: "545fd4c25a07d2775f7d5af05a979b2cac4fbf79393b0a7f5d33ba39ba4f6187"
url: "https://pub.dev"
source: hosted
version: "1.0.10"
flutter_inappwebview_web:
dependency: transitive
description:
name: flutter_inappwebview_web
sha256: d8c680abfb6fec71609a700199635d38a744df0febd5544c5a020bd73de8ee07
url: "https://pub.dev"
source: hosted
version: "1.0.8"
version: "5.8.0"
flutter_launcher_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -552,14 +504,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.19.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -1089,10 +1033,10 @@ packages:
dependency: "direct main"
description:
name: youtube_player_flutter
sha256: "899f1fd15e924eb41150c78c5e2adfd7310100c26b2e1996c148d79e42737d72"
sha256: "72d487e1a1b9155a2dc9d448c137380791101a0ff623723195275ac275ac6942"
url: "https://pub.dev"
source: hosted
version: "9.0.1"
version: "8.1.2"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ dependencies:
flutter_email_sender: ^6.0.2
shimmer: ^3.0.0
cloud_firestore: ^5.0.0
youtube_player_flutter: ^9.0.0
youtube_player_flutter: ^8.1.0
cached_network_image: ^3.3.1
video_player: ^2.8.6
intl: ^0.19.0
flutter_launcher_icons: ^0.13.1
google_sign_in: ^6.2.1
firebase_crashlytics: ^4.0.2
firebase_analytics: ^11.1.0
flutter_inappwebview: ^6.0.0
flutter_inappwebview: ^5.8.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit c98c9c3

Please sign in to comment.