We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@override Widget build(BuildContext context) { return AspectRatio( aspectRatio: 16 / 9, child: Stack( children: [ Container( margin: const EdgeInsets.fromLTRB(0, 40, 0, 40), child: NativeVideoPlayerView( onViewReady: (controller) async { _controller = controller; await _controller?.setVolume(1); controller.onPlaybackReady.addListener(() { final videoInfo = controller.videoInfo; final videoWidth = videoInfo?.width; final videoHeight = videoInfo?.height; final videoDuration = videoInfo?.duration; final aspectRatio = videoInfo?.aspectRatio; print("videoWidth is: $videoWidth"); print("videoHeight is: $videoHeight"); print("videoDuration is: $videoDuration"); print("aspectRatio is: $aspectRatio"); }); controller.onPlaybackStatusChanged.addListener(() { final playbackStatus = controller.playbackInfo?.status; print("playbackStatus is: $playbackStatus"); }); controller.onPlaybackPositionChanged.addListener(() { final playbackPosition = controller.playbackInfo?.position; print("playbackPosition is: $playbackPosition"); }); }, ), ), Material( type: MaterialType.transparency, child: InkWell( onTap: _togglePlayback, child: Center( child: FutureBuilder( future: _isPlaying, initialData: false, builder: ( BuildContext context, AsyncSnapshot<bool> snapshot, ) { final isPlaying = snapshot.data ?? false; return Icon( isPlaying ? Icons.pause : Icons.play_arrow, size: 64, color: Colors.white, ); }, ), ), ), ), ], ), ); }
My example VideoInfo is not the actual size of the video How to obtain the actual width and height of a video
🙏🙏🙏
The text was updated successfully, but these errors were encountered:
Thank you for opening this issue!
I will look into it as soon as possible. In the meantime, please review these important project updates:
Your feedback and contributions are greatly appreciated!
Sorry, something went wrong.
@chengyeah could you please test out the latest dev version (https://pub.dev/packages/native_video_player/versions/3.0.0-dev.3) and see if you have the same problem? Thanks! Check out the changelog and readme for the API changes I've made.
No branches or pull requests
My example
VideoInfo is not the actual size of the video
How to obtain the actual width and height of a video
🙏🙏🙏
The text was updated successfully, but these errors were encountered: