-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[BUG]: Video's aspect ratio changing on android when restarting with repeat set to true #4187
Comments
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
|
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
|
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
|
Same issue. |
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.6.1, while the latest stable version is 6.6.2. Please update to the latest version and check if the issue still exists.
|
I don't reproduce the issue with the sample app... |
Maybe you can try with this patch, I suspect this is the root ause diff --git a/android/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java
index 45624d6f..e8dc92c9 100644
--- a/android/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java
+++ b/android/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java
@@ -275,6 +275,7 @@ public final class ExoPlayerView extends FrameLayout implements AdViewProvider {
case 90:
case 270:
layout.setVideoAspectRatio(format.width == 0 ? 1 : (format.height * format.pixelWidthHeightRatio) / format.width);
+ break;
default:
layout.setVideoAspectRatio(format.height == 0 ? 1 : (format.width * format.pixelWidthHeightRatio) / format.height);
} |
I confirm this is the good fix, I will open a PR with this patch |
@freeboub merci ! |
@freeboub the issue still persists in v6.6.4 |
Please provide a sample to reproduce the issue . |
`const isActive = activePage === indexInFeed; const getResizeMode = useMemo(() => { const isPaused = useMemo(() => { if (Math.abs(activePage - indexInFeed) > 2 || !source) return null; return ( |
@freeboub commenting out lines 277 and 280 in ExpoPlayerView.java file fixed the issue. Not sure why this code is being triggered in the first place even though the rotation hasn't changed |
Please provide it in a git repository with sample video. It is painful to try to replicate issues... |
@freeboub here is a repository link where you can reproduce. Please test it on android, the issue happens after the video repeats once or twice |
As you see I have reopen the ticket, with this video it is also reproduced with the sample app (Thank you for sharing it !). But ! There is an issue in your manifest file, if you open the m3u you will see following configuration : #EXT-X-STREAM-INF:BANDWIDTH=5000000,AVERAGE-BANDWIDTH=4000000,CODECS="mp4a.40.2,avc1.640028",RESOLUTION=1920x1080,CLOSED-CAPTIONS=NONE which means you stream is 1920X1080 where it is 1080X1920 You can compare with this stream which is landscape: https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8 As a conclusion:
#nightmare 😆 |
Version
6.6.1
What platforms are you having the problem on?
Android
System Version
Android Version 14 One Ui 6.1
On what device are you experiencing the issue?
Real device
Architecture
Old architecture
What happened?
After updating to version 6.6.1, on android when a video repeats its changing the aspect ratio of the video. What was expected to happen is to repeat without affecting the aspect ratio.
Untitled.mp4
Reproduction Link
repository link
Reproduction
Step to reproduce this bug are:
The text was updated successfully, but these errors were encountered: