You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Video Player should have the video running normally with sound and image
Actual results
Video Player does not load any image, only audio
Code sample
Code sample
classHomeVideoPlayerextendsStatefulWidget {
constHomeVideoPlayer({
requiredthis.video,
super.key,
});
finalString video;
@overrideState<HomeVideoPlayer> createState() =>_HomeVideoPlayerState();
}
class_HomeVideoPlayerStateextendsState<HomeVideoPlayer> {
lateVideoPlayerController _controller;
bool isPlaying =false;
@overridevoidinitState() {
super.initState();
_controller =VideoPlayerController.networkUrl(Uri.parse(widget.video))
..initialize().then((_) {
// Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.setState(() {});
});
}
@overrideWidgetbuild(BuildContext context) {
returnAspectRatio(
aspectRatio:16/9,
// aspectRatio: _controller.value.aspectRatio,
child:GestureDetector(
onTap: () {
if (isPlaying) {
_controller.pause();
} else {
_controller.play();
}
setState(() {
isPlaying =!isPlaying;
});
},
child:VideoPlayer(_controller),
),
);
}
@overridevoiddispose() {
_controller.dispose();
super.dispose();
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22635.3575], locale en-GB) • Flutter version 3.22.0 on channel stable at J:\Programming\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5dcb86f68f (10 days ago), 2024-05-09 07:39:20 -0500 • Engine revision f6344b75dc • Dart version 3.4.0 • DevTools version 2.34.3[√] Windows Version (Installed version of Windows is version 10 or higher)[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at J:\Programming\Android\Android_SDK • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = J:\Programming\Android\Android_SDK • ANDROID_SDK_ROOT = J:\Programming\Android\Android_SDK • Java binary at: J:\Programming\Android\Android_Studio_Canary\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105) • All Android licenses accepted.[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4) • Visual Studio at J:\VisualStudio\Community • Visual Studio Community 2022 version 17.4.33213.308 • Windows 10 SDK version 10.0.19041.0[√] Android Studio (version 2024.1) • Android Studio at J:\Programming\Android\Android_Studio_Canary • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)[√] IntelliJ IDEA Community Edition (version 2024.1) • IntelliJ at J:\IntelliJ IDEA • Flutter plugin version 79.1.3 • Dart plugin version 241.15989.9[√] VS Code (version 1.86.1) • VS Code at C:\Users\ahmad\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.52.0[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22635.3575] • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.60 • Edge (web) • edge • web-javascript • Microsoft Edge 121.0.2277.65[√] Network resources • All expected network resources are available.• No issues found!
The text was updated successfully, but these errors were encountered:
@dovahkiin98 As mentioned above, this hasn't been supported yet since the PR is not merged. I'm going to close this issue. You can try the code changes from PR flutter/packages#6456. Once it's merged but the issue persists, please write in the comments and I will re-open this issue right away. Thanks!
Steps to reproduce
video_player
packageVideoPlayer
Expected results
Video Player should have the video running normally with sound and image
Actual results
Video Player does not load any image, only audio
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: