-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopfound in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-macosOwned by the macOS platform teamOwned by the macOS platform teamtriaged-macosTriaged by the macOS platform teamTriaged by the macOS platform team
Description
Steps to reproduce
Steps to Reproduce
- Create a new Flutter project.
- Add the dependency:
dependencies:
video_player: ^2.9.2
Expected results
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
class VideoExample extends StatefulWidget {
const VideoExample({super.key});
@override
State<VideoExample> createState() => _VideoExampleState();
}
class _VideoExampleState extends State<VideoExample> {
late VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.asset("assets/sample.mp4")
..initialize().then((_) {
setState(() {});
_controller.play();
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: _controller.value.isInitialized
? AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
)
: const CircularProgressIndicator(),
),
);
}
}
Actual results
- The app runs on macOS.
- The video does not load.
- flutter: Video Error: PlatformException(VideoError, Failed to load video: The operation could not be completed: An unknown error occurred (-101): The operation couldn’t be completed. (OSStatus error -101.), null, null)
this errro printed
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
flutter: Video Error: PlatformException(VideoError, Failed to load video: The operation could not be completed: An unknown error occurred (-101): The operation couldn’t be completed. (OSStatus error -101.), null, null)
Flutter Doctor output
Doctor output
[Paste your output here]
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopfound in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-macosOwned by the macOS platform teamOwned by the macOS platform teamtriaged-macosTriaged by the macOS platform teamTriaged by the macOS platform team