Delete flutter-exoplayer/flutter_beta_exoplayer_creator directory

This commit is contained in:
Anirudh Sevugan 2025-01-28 18:49:30 -06:00 committed by GitHub
parent 7dd9fa6ead
commit ecfe8371f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 0 additions and 1960 deletions

View File

@ -1,45 +0,0 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

View File

@ -1,30 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "8495dee1fd4aacbe9de707e7581203232f591b2f"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: android
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -1,16 +0,0 @@
# media3_exoplayer_creator
ExoPlayer Creator that supports Media3
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

View File

@ -1,28 +0,0 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View File

@ -1,13 +0,0 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks

View File

@ -1,44 +0,0 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.anirudhsevugan.md3exoplayer.media3_exoplayer_creator"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.anirudhsevugan.md3exoplayer.media3_exoplayer_creator"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
}
}
}
flutter {
source = "../.."
}

View File

@ -1,7 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -1,49 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Add Internet and storage permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> -->
<application
android:label="ExoPlayer Creator (New Edition)"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:hardwareAccelerated="true">
<meta-data
android:name="com.google.android.exoplayer2.logging"
android:value="true" />
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>

View File

@ -1,5 +0,0 @@
package com.anirudhsevugan.md3exoplayer.media3_exoplayer_creator
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,7 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -1,18 +0,0 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -1,3 +0,0 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

View File

@ -1,25 +0,0 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.2.1" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -1,107 +0,0 @@
import 'package:flutter/material.dart';
import 'package:media3_exoplayer_creator/screens/video_screen.dart'; // Import other files as needed
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
bool _isDarkMode = false;
void _toggleTheme() {
setState(() {
_isDarkMode = !_isDarkMode;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: _isDarkMode
? ThemeData.dark().copyWith(
primaryColor: Colors.lightBlue, // Light Blue primary color
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.lightBlue)
.copyWith(secondary: Colors.lightBlue),
appBarTheme: AppBarTheme(
color: Colors.lightBlue,
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.lightBlue, // Light Blue for text buttons
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.lightBlue, // Light Blue for borders
width: 2,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.lightBlue, // Light Blue for focused border
width: 2,
),
),
),
)
: ThemeData.light().copyWith(
primaryColor: Colors.lightBlue, // Light Blue primary color
scaffoldBackgroundColor: Colors.white,
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.lightBlue)
.copyWith(secondary: Colors.lightBlue),
appBarTheme: AppBarTheme(
color: Colors.lightBlue,
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.lightBlue, // Light Blue for text buttons
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.lightBlue, // Light Blue for borders
width: 2,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.lightBlue, // Light Blue for focused border
width: 2,
),
),
),
),
home: Scaffold(
body: VideoScreen(),
),
);
}
}

View File

@ -1,339 +0,0 @@
import 'package:flutter/material.dart';
import 'package:file_picker/file_picker.dart';
import '../widgets/video_player_widget.dart';
class VideoScreen extends StatefulWidget {
const VideoScreen({super.key});
@override
_VideoScreenState createState() => _VideoScreenState();
}
class _VideoScreenState extends State<VideoScreen> {
String _videoUrl = '';
String _filePath = '';
String _subtitleUrl = '';
String _subtitleFilePath = '';
final bool _isDarkMode = false; // Store the manual theme preference
// Function to pick the file after choosing the type
Future<void> _pickFile(FileType type) async {
FilePickerResult? result = await FilePicker.platform.pickFiles(
type: type, // File type selected by user
);
if (result != null && result.files.single.path != null) {
setState(() {
_filePath = result.files.single.path!;
_videoUrl = ''; // Clear video URL if file is picked
});
}
}
// Show the dialog to choose file type
Future<void> _showFileTypeDialog() async {
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('What kind of file would you like to pick?'),
actions: <Widget>[
TextButton(
child: const Text('Video'),
onPressed: () {
Navigator.of(context).pop();
_pickFile(FileType.video); // Pick video files
},
),
TextButton(
child: const Text('Audio'),
onPressed: () {
Navigator.of(context).pop();
_pickFile(FileType.audio); // Pick audio files
},
),
TextButton(
child: const Text('Cancel'),
onPressed: () => Navigator.of(context).pop(), // Cancel action
),
],
);
},
);
}
// Show the dialog to enter video URL
Future<void> _showVideoURLDialog() async {
final TextEditingController videoController = TextEditingController();
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Enter Media URL'),
content: TextField(
controller: videoController,
decoration: const InputDecoration(hintText: 'Enter a valid media URL'),
keyboardType: TextInputType.url,
),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
onPressed: () => Navigator.of(context).pop(),
),
TextButton(
child: const Text('OK'),
onPressed: () {
setState(() {
_videoUrl = videoController.text;
_filePath = '';
});
Navigator.of(context).pop();
},
),
],
);
},
);
}
// Show the subtitle dialog
Future<void> _showSubtitleDialog() async {
final TextEditingController subtitleController = TextEditingController();
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Enter Subtitle URL'),
content: TextField(
controller: subtitleController,
decoration: const InputDecoration(hintText: 'Enter a valid subtitle URL'),
keyboardType: TextInputType.url,
),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
onPressed: () => Navigator.of(context).pop(),
),
TextButton(
child: const Text('OK'),
onPressed: () {
setState(() {
_subtitleUrl = subtitleController.text;
_subtitleFilePath = ''; // Clear file path when URL is used
});
Navigator.of(context).pop();
},
),
],
);
},
);
}
// Play the video
void _playMedia() {
setState(() {
// Switch to the VideoPlayerWidget screen
});
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: _onWillPop, // Custom back button behavior
child: MaterialApp(
debugShowCheckedModeBanner: false,
themeMode: _isDarkMode ? ThemeMode.dark : ThemeMode.system,
// Respect system theme
theme: _lightTheme(),
darkTheme: _darkTheme(),
home: Scaffold(
appBar: _videoUrl.isNotEmpty || _filePath.isNotEmpty
? null // Hide AppBar when video is playing
: AppBar(
title: const Text('SimpliPlay Neo'),
),
body: Center(
child: _videoUrl.isEmpty && _filePath.isEmpty
? SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Central Buttons (Enter Video URL, Choose File, Add Subtitle)
_buildButtonRow(),
SizedBox(height: 20),
// Play Button - This only appears if a file or URL is chosen
],
),
)
: WillPopScope(
onWillPop: () async {
// Show confirmation dialog before exiting VideoPlayerWidget
return (await _showExitConfirmation()) ?? false;
},
child: VideoPlayerWidget(
videoUrl: _videoUrl,
filePath: _filePath,
subtitleUrl: _subtitleUrl,
subtitleFilePath: _subtitleFilePath,
),
),
),
),
),
);
}
// Row containing the buttons
Widget _buildButtonRow() {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_buildCentralButton(
icon: Icons.link,
label: 'Enter Media URL',
onPressed: _showVideoURLDialog,
),
SizedBox(width: 20),
_buildCentralButton(
icon: Icons.video_library,
label: 'Choose File',
onPressed: _showFileTypeDialog, // Show the file type dialog
),
SizedBox(width: 20),
_buildCentralButton(
icon: Icons.subtitles,
label: 'Enter Subtitle URL',
onPressed: _showSubtitleDialog,
),
],
);
}
// Central button widget
Widget _buildCentralButton({
required IconData icon,
required String label,
required VoidCallback onPressed,
}) {
return Column(
children: [
IconButton(
icon: Icon(icon, size: 50),
onPressed: onPressed,
),
Text(label),
],
);
}
Future<bool> _onWillPop() async {
// If the video is not playing (i.e., file or URL is empty), exit the app
if (_videoUrl.isEmpty && _filePath.isEmpty) {
return true; // Exit the app
}
// If the video is playing, show the confirmation dialog
return (await _showExitConfirmation()) ?? false;
}
// Show the exit confirmation dialog
Future<bool?> _showExitConfirmation() async {
return showDialog<bool>(
context: context,
barrierDismissible: false, // Prevent dismissing by tapping outside the dialog
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Are you sure you want to exit?'),
actions: <Widget>[
TextButton(
child: const Text('No'),
onPressed: () {
Navigator.of(context).pop(false); // Stay on current screen
},
),
TextButton(
child: const Text('Yes'),
onPressed: () {
Navigator.of(context).pop(true); // Navigate back to VideoScreen
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => VideoScreen()));
},
),
],
);
},
);
}
// Light theme
ThemeData _lightTheme() {
return ThemeData(
primaryColor: Colors.lightBlue,
scaffoldBackgroundColor: Colors.white,
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.lightBlue)
.copyWith(secondary: Colors.lightBlue),
appBarTheme: AppBarTheme(
color: Colors.lightBlue,
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
iconTheme: IconThemeData(
color: Colors.black, // Black icons for light mode
),
textTheme: TextTheme(
bodyLarge: TextStyle(color: Colors.black),
bodyMedium: TextStyle(color: Colors.black),
bodySmall: TextStyle(color: Colors.black),
),
dialogTheme: DialogTheme(
backgroundColor: Colors.white,
// White background for dialog in light mode
titleTextStyle: TextStyle(
color: Colors.black), // Black text in light mode
),
);
}
// Dark theme
ThemeData _darkTheme() {
return ThemeData(
primaryColor: Colors.blue,
// Primary color for the theme
scaffoldBackgroundColor: Colors.black,
// Black background for the scaffold
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue)
.copyWith(secondary: Colors.blue),
appBarTheme: AppBarTheme(
color: Colors.blue, // Blue AppBar background
titleTextStyle: TextStyle(
color: Colors.white, // White text on AppBar
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
iconTheme: IconThemeData(
color: Colors.white, // White icons for dark mode
),
textTheme: TextTheme(
bodyLarge: TextStyle(color: Colors.white),
bodyMedium: TextStyle(color: Colors.white),
bodySmall: TextStyle(color: Colors.white),
),
dialogTheme: DialogTheme(
backgroundColor: Color(0xFF333333),
// Dark background for dialog in dark mode
titleTextStyle: TextStyle(
color: Colors.white), // White text in dark mode
),
);
}
}

View File

@ -1,52 +0,0 @@
import 'package:permission_handler/permission_handler.dart';
import 'package:flutter/material.dart';
Future<void> requestPermissionIfNeeded(String subtitleFilePath, BuildContext context) async {
if (subtitleFilePath.isNotEmpty) {
// Only request permission if a subtitle file is chosen
PermissionStatus status = await Permission.storage.status;
if (!status.isGranted) {
// If permission is not granted, request it
status = await Permission.storage.request();
if (status.isDenied) {
// If permission is denied, show an alert dialog
_showPermissionDeniedDialog(context);
return; // Exit as we cannot proceed without permission
} else if (status.isPermanentlyDenied) {
// If the permission is permanently denied, guide the user to settings
_showPermissionDeniedDialog(context, permanentlyDenied: true);
return;
}
}
}
}
void _showPermissionDeniedDialog(BuildContext context, {bool permanentlyDenied = false}) {
showDialog(
context: context,
barrierDismissible: false, // Prevent tapping outside to dismiss
builder: (BuildContext context) {
return AlertDialog(
title: Text('Permission Denied'),
content: Text(
permanentlyDenied
? 'The permission to access external storage has been permanently denied. Please go to the app settings to enable it.'
: 'You have denied the permission to access external storage. Please allow it to proceed.',
),
actions: <Widget>[
TextButton(
onPressed: () {
if (permanentlyDenied) {
// Optionally, open app settings if permission is permanently denied
openAppSettings();
}
Navigator.of(context).pop(); // Close the dialog
},
child: Text('OK'),
),
],
);
},
);
}

View File

@ -1,25 +0,0 @@
class VideoPlayerManager {
static final VideoPlayerManager _instance = VideoPlayerManager._internal();
bool _isPlaying = false;
// Private constructor
VideoPlayerManager._internal();
factory VideoPlayerManager() {
return _instance;
}
// To start playing the video
void playVideo() {
_isPlaying = true;
}
// To stop or pause the video
void stopVideo() {
_isPlaying = false;
}
// To check if video is playing
bool get isPlaying => _isPlaying;
}

View File

@ -1,38 +0,0 @@
class WebVttCue {
final Duration start;
final Duration end;
final String text;
WebVttCue({
required this.start,
required this.end,
required this.text,
});
}
// Subtitle parsing logic (WebVTT format)
List<WebVttCue> parseWebVtt(String subtitleData) {
final cuePattern = RegExp(r'(\d{2}:\d{2}:\d{2}.\d{3}) --> (\d{2}:\d{2}:\d{2}.\d{3})\n(.*?)\n\n', dotAll: true);
final List<WebVttCue> cues = [];
for (final match in cuePattern.allMatches(subtitleData)) {
final start = _parseTime(match.group(1)!);
final end = _parseTime(match.group(2)!);
final text = match.group(3)!;
cues.add(WebVttCue(start: start, end: end, text: text));
}
return cues;
}
// Helper method to parse time string to Duration
Duration _parseTime(String time) {
final parts = time.split(':');
final secondsParts = parts[2].split('.');
return Duration(
hours: int.parse(parts[0]),
minutes: int.parse(parts[1]),
seconds: int.parse(secondsParts[0]),
milliseconds: int.parse(secondsParts[1]),
);
}

View File

@ -1,304 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:video_player/video_player.dart';
import 'package:chewie/chewie.dart';
import 'package:http/http.dart' as http;
import 'dart:io'; // Import to use File class
import 'package:media3_exoplayer_creator/utils/permission_utils.dart'; // Import permission_utils.dart for permission handling
import 'package:keep_screen_on/keep_screen_on.dart'; // Import keep_screen_on
import '../utils/web_vtt.dart'; // Import web_vtt.dart for subtitle handling
class VideoPlayerWidget extends StatefulWidget {
final String videoUrl;
final String filePath;
final String subtitleUrl;
final String subtitleFilePath;
const VideoPlayerWidget({
super.key,
required this.videoUrl,
required this.filePath,
required this.subtitleUrl,
required this.subtitleFilePath,
});
@override
_VideoPlayerWidgetState createState() => _VideoPlayerWidgetState();
}
class _VideoPlayerWidgetState extends State<VideoPlayerWidget> {
late VideoPlayerController _videoPlayerController;
late ChewieController _chewieController;
late List<WebVttCue> _subtitles;
String? _currentSubtitle;
bool _isLoading = true;
double _playbackSpeed = 1.0;
bool _controlsVisible = true; // Keep track of control visibility
@override
void initState() {
super.initState();
// Request permission for subtitle files if needed
if (widget.subtitleFilePath.isNotEmpty) {
requestPermissionIfNeeded(widget.subtitleFilePath, context);
}
// Initialize the video player controller based on video URL or file path
if (widget.filePath.isNotEmpty) {
_videoPlayerController =
VideoPlayerController.file(File(widget.filePath));
} else {
_videoPlayerController =
VideoPlayerController.networkUrl(Uri.parse(widget.videoUrl));
}
// Initialize the Chewie controller for video playback
_initializeChewieController();
// Load subtitles if needed
_loadSubtitles();
// Keep the screen on while the video is playing
KeepScreenOn.turnOn();
// Listen to video position changes to update subtitles
_videoPlayerController.addListener(_updateCurrentSubtitle);
// Apply immersive mode once the widget builds
WidgetsBinding.instance.addPostFrameCallback((_) {
_applyImmersiveMode();
});
// Initialize the video player
_initializeVideoPlayer();
}
void _applyImmersiveMode() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
}
void _initializeChewieController() {
_chewieController = ChewieController(
videoPlayerController: _videoPlayerController,
aspectRatio: 16 / 9,
autoPlay: true,
looping: true,
allowPlaybackSpeedChanging: false,
// Disable built-in playback speed dropdown
customControls: MaterialControls(
// Custom controls if needed
),
showControlsOnInitialize: true, // Show controls on initialization
);
}
@override
void dispose() {
KeepScreenOn.turnOff();
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual, overlays: SystemUiOverlay.values);
_videoPlayerController.removeListener(_updateCurrentSubtitle);
_chewieController.dispose();
_videoPlayerController.dispose();
super.dispose();
}
Future<void> _loadSubtitles() async {
setState(() {
_isLoading = true;
});
if (widget.subtitleFilePath.isNotEmpty) {
try {
final file = File(widget.subtitleFilePath);
final subtitleData = await file.readAsString();
setState(() {
_subtitles = parseWebVtt(subtitleData);
_isLoading = false;
});
} catch (e) {
setState(() {
_isLoading = false;
});
print('Error loading subtitle file: $e');
}
} else if (widget.subtitleUrl.isNotEmpty) {
try {
final response = await http.get(Uri.parse(widget.subtitleUrl));
if (response.statusCode == 200) {
setState(() {
_subtitles = parseWebVtt(response.body);
_isLoading = false;
});
} else {
setState(() {
_isLoading = false;
});
print('Failed to load subtitle from URL: ${response.statusCode}');
}
} catch (e) {
setState(() {
_isLoading = false;
});
print('Error loading subtitle from URL: $e');
}
}
}
void _updateCurrentSubtitle() {
final currentTime = _videoPlayerController.value.position;
for (var cue in _subtitles) {
if (currentTime >= cue.start && currentTime <= cue.end) {
setState(() {
_currentSubtitle = cue.text;
});
return;
}
}
setState(() {
_currentSubtitle = '';
});
}
void _initializeVideoPlayer() async {
await _videoPlayerController.initialize();
setState(() {
_isLoading = false;
});
}
void _changePlaybackSpeed(double speed) {
setState(() {
_playbackSpeed = speed;
_videoPlayerController.setPlaybackSpeed(speed);
// Reapply immersive mode after speed change
WidgetsBinding.instance.addPostFrameCallback((_) {
_applyImmersiveMode();
});
});
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
_applyImmersiveMode(); // Reapply immersive mode on back press
return true; // Allow the back action to proceed
},
child: Scaffold(
body: Stack(
children: [
// This GestureDetector is now the topmost widget in the stack
GestureDetector(
onTap: () {
setState(() {
_controlsVisible = !_controlsVisible; // Toggle controls visibility on tap anywhere
});
_applyImmersiveMode(); // Reapply immersive mode
},
child: Column(
children: [
Expanded(
child: Container(
color: Colors.black,
child: Chewie(controller: _chewieController),
),
),
],
),
),
// Loading Indicator
if (_isLoading)
Center(child: CircularProgressIndicator()),
// Subtitle display
if (_currentSubtitle != null && _currentSubtitle!.isNotEmpty && !_isLoading)
Positioned(
bottom: 70,
left: 0,
right: 0,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
color: Colors.black.withOpacity(0.7),
child: Text(
_currentSubtitle!,
style: TextStyle(fontSize: 19, color: Colors.white),
textAlign: TextAlign.center,
),
),
),
// Custom playback speed control button
Positioned(
top: 8,
right: 8,
child: AnimatedOpacity(
opacity: _controlsVisible ? 1.0 : 0.0,
duration: Duration(milliseconds: 300),
// Adjust duration for fade effect
child: IconButton(
icon: SizedBox.shrink(), // No icon, just an empty space
onPressed: () {
_applyImmersiveMode(); // Reapply immersive mode
_showPlaybackSpeedDialog();
},
),
),
),
],
),
),
);
}
void _showPlaybackSpeedDialog() {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(
"Select Playback Speed",
style: TextStyle(
fontSize: 20, // Keep the title size consistent
color: Theme
.of(context)
.brightness == Brightness.light
? Colors.grey
: Colors.grey
),
),
content: SingleChildScrollView( // Wrap content with SingleChildScrollView
child: Column(
mainAxisSize: MainAxisSize.min,
children: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0].map((
speed) {
return ListTile(
title: Text(
"${speed}x",
style: TextStyle(
color: Theme
.of(context)
.textTheme
.bodyMedium
?.color ??
Colors.grey, // Dynamic text color based on theme
),
),
onTap: () {
_changePlaybackSpeed(speed);
Navigator.of(context).pop();
},
);
}).toList(),
),
),
);
},
);
}
}

View File

@ -1,642 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
args:
dependency: transitive
description:
name: args
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
url: "https://pub.dev"
source: hosted
version: "2.6.0"
async:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
chewie:
dependency: "direct main"
description:
name: chewie
sha256: "335df378c025588aef400c704bd71f0daea479d4cd57c471c88c056c1144e7cd"
url: "https://pub.dev"
source: hosted
version: "1.8.5"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
url: "https://pub.dev"
source: hosted
version: "0.4.2"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.19.0"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
crypto:
dependency: transitive
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
csslib:
dependency: transitive
description:
name: csslib
sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
cupertino_icons:
dependency: transitive
description:
name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.8"
dbus:
dependency: transitive
description:
name: dbus
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: c904b4ab56d53385563c7c39d8e9fa9af086f91495dfc48717ad84a42c3cf204
url: "https://pub.dev"
source: hosted
version: "8.1.7"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e"
url: "https://pub.dev"
source: hosted
version: "2.0.24"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec"
url: "https://pub.dev"
source: hosted
version: "0.15.5"
http:
dependency: transitive
description:
name: http
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev"
source: hosted
version: "1.2.2"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
image:
dependency: transitive
description:
name: image
sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6"
url: "https://pub.dev"
source: hosted
version: "4.5.2"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
keep_screen_on:
dependency: "direct main"
description:
name: keep_screen_on
sha256: "374405358a3229b0e1041b6e390ff4c74e73fbd21075298042044e0c84b5574c"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
keep_screen_on_platform_interface:
dependency: transitive
description:
name: keep_screen_on_platform_interface
sha256: "065a0811407a970027c7530f9b8f36d11c89f36aab85b4b5acdacfe2cf3a8568"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
lints:
dependency: transitive
description:
name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
source: hosted
version: "5.1.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.15.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
sha256: "70c421fe9d9cc1a9a7f3b05ae56befd469fe4f8daa3b484823141a55442d858d"
url: "https://pub.dev"
source: hosted
version: "8.1.2"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: a5ef9986efc7bf772f2696183a3992615baa76c1ffb1189318dd8803778fb05b
url: "https://pub.dev"
source: hosted
version: "3.0.2"
path:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
url: "https://pub.dev"
source: hosted
version: "11.3.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1"
url: "https://pub.dev"
source: hosted
version: "12.0.13"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0
url: "https://pub.dev"
source: hosted
version: "9.4.5"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: e9c8eadee926c4532d0305dff94b85bf961f16759c3af791486613152af4b4f9
url: "https://pub.dev"
source: hosted
version: "4.2.3"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.0.2"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
posix:
dependency: transitive
description:
name: posix
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
url: "https://pub.dev"
source: hosted
version: "6.0.1"
provider:
dependency: transitive
description:
name: provider
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.2"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.12.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.2"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.7.3"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
url: "https://pub.dev"
source: hosted
version: "6.3.14"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626"
url: "https://pub.dev"
source: hosted
version: "6.3.2"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
url: "https://pub.dev"
source: hosted
version: "3.1.3"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
video_player:
dependency: "direct main"
description:
name: video_player
sha256: "4a8c3492d734f7c39c2588a3206707a05ee80cef52e8c7f3b2078d430c84bc17"
url: "https://pub.dev"
source: hosted
version: "2.9.2"
video_player_android:
dependency: transitive
description:
name: video_player_android
sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
url: "https://pub.dev"
source: hosted
version: "2.7.16"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: "33224c19775fd244be2d6e3dbd8e1826ab162877bd61123bf71890772119a2b7"
url: "https://pub.dev"
source: hosted
version: "2.6.5"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
sha256: "229d7642ccd9f3dc4aba169609dd6b5f3f443bb4cc15b82f7785fcada5af9bbb"
url: "https://pub.dev"
source: hosted
version: "6.2.3"
video_player_web:
dependency: transitive
description:
name: video_player_web
sha256: "881b375a934d8ebf868c7fb1423b2bfaa393a0a265fa3f733079a86536064a10"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "14.3.0"
wakelock_plus:
dependency: transitive
description:
name: wakelock_plus
sha256: "36c88af0b930121941345306d259ec4cc4ecca3b151c02e3a9e71aede83c615e"
url: "https://pub.dev"
source: hosted
version: "1.2.10"
wakelock_plus_platform_interface:
dependency: transitive
description:
name: wakelock_plus_platform_interface
sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
web:
dependency: transitive
description:
name: web
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
url: "https://pub.dev"
source: hosted
version: "1.1.0"
win32:
dependency: transitive
description:
name: win32
sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69"
url: "https://pub.dev"
source: hosted
version: "5.9.0"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.24.0"

View File

@ -1,97 +0,0 @@
name: media3_exoplayer_creator
description: "ExoPlayer Creator that supports Media3"
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: ^3.6.0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
video_player: ^2.9.2 # Make sure to check for the latest version
chewie: ^1.8.5 # Optional, if you want to use a higher-level video player with controls
keep_screen_on: ^3.0.0 # Add this line
file_picker: ^8.1.7 # Use the latest version
permission_handler: ^11.3.1
url_launcher: ^6.3.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.13.1
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
flutter_launcher_icons:
android: true
ios: true
image_path: "assets/icon.png"
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons ina
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/ani.png
- assets/icon.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package