Skip to content
New issue

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

AspectRatio #22

Closed
leszekkrol opened this issue May 14, 2020 · 3 comments
Closed

AspectRatio #22

leszekkrol opened this issue May 14, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@leszekkrol
Copy link

leszekkrol commented May 14, 2020

How can I get AspectRadio of video using BetterPlayerListVideoPlayer? it is not possible to set the controller here. In the application I have many movies in various aspects ratios. Any ideas?

@leszekkrol leszekkrol changed the title AspectRadio AspectRatio May 14, 2020
@jhomlala
Copy link
Owner

jhomlala commented May 23, 2020

If you look into video_list_widget.dart example, you can find this widget:

   AspectRatio(
              child: BetterPlayerListVideoPlayer(
                BetterPlayerDataSource(
                    BetterPlayerDataSourceType.NETWORK, videoListData.videoUrl),
                configuration: BetterPlayerConfiguration(
                  autoPlay: false,
                  aspectRatio: 9 / 16,
                ),
                playFraction: 0.8,
                key: Key(videoListData.hashCode.toString()),
              ),
              aspectRatio: 9 / 16),

You can setup aspectRatio for wrapper widget and you can pass aspectRatio to the BetterPlayerConfiguration. This will give you option to setup different sizes of videos. You can store somewhere betterPlayerConfigurration and retrieve aspect ratio from it at the later stage.

@jhomlala jhomlala self-assigned this May 23, 2020
@jhomlala jhomlala added the question Further information is requested label May 23, 2020
@wann2
Copy link

wann2 commented May 28, 2020

BetterPlayer is very good!

I'd like to aspectRatio with 16/9 when the remote video recorded in horizontal.
Can betterplayer recognize whether the remote video is horizontal or vertical?
Or I hope you could support any idea.

@jhomlala
Copy link
Owner

jhomlala commented Aug 1, 2020

@wann2 please create new issue, so I will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants