-
Notifications
You must be signed in to change notification settings - Fork 6k
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
SimpleExoPlayer work with SimpleExoPlayerView #2240
Comments
resizeMode means resolution shows user in device monitor? or video frame? if the latter, I think video frame's size is dependent on encoder so it can't change It is only my opinion, other person comment please if i was wrong about this issue |
|
@ojw28 What I need is |
I don't think the approach in your pull request is the best way to achieve this. I have a feeling it might not always work properly, but I don't have any hard data confirming this yet. In any case, if you're using |
@ojw28 I have tried your advice, it doesn't work. /**
* The content is scaled, maintaining its aspect ratio, the whole
* surface area is used, content may be cropped.
* <p class=note>
* This mode is only suitable for content with 1:1 pixel aspect ratio as you cannot
* configure the pixel aspect ratio for a {@link Surface}.
* <p class=note>
* As of {@link android.os.Build.VERSION_CODES#N} release, this mode may not work if
* the video is {@linkplain MediaFormat#KEY_ROTATION rotated} by 90 or 270 degrees.
*/
public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; |
What does "doesn't work" mean exactly? It should work. Setting |
@ojw28 just video with black edges |
|
@ojw28 it works, thanks for your help |
I want to get video's size through
SimpleExoPlayer.VideoListener
, then changeSimpleExoPlayerView
's resizeMode dynamically. Currently it's impossible.Here's the code
since
SimpleExoPlayer
'sVideoListener
is not exposed, there's no way to reach the goal except reflectionExoPlayer version: 2.1.1
The text was updated successfully, but these errors were encountered: