-
Notifications
You must be signed in to change notification settings - Fork 0
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
5.2.1 Changes #38
base: copy_5.2.1
Are you sure you want to change the base?
5.2.1 Changes #38
Conversation
This reverts commit c2d883c.
}; | ||
forceReload = () => { | ||
if (Platform.OS === 'ios') { | ||
// TODO iOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force-reload in iOS handling not needed here?
|
||
if (!uri) { | ||
if (!uri) { | ||
console.warn('Trying to load empty source.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do error handling in an UI when uri is invalid?
@@ -39,14 +46,19 @@ public final class ExoPlayerView extends FrameLayout { | |||
private SimpleExoPlayer player; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that we want to move ahead with the deprecated version of Exoplayer - v2, instead of using the Exoplayer from android.media3
? Last version supported will be v2.19.0.
} | ||
} | ||
} catch (Exception e) { | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace all e.printStackTrace()
usages with Log.d, since it shows up on prod
&& currentPos != null | ||
&& playBackState == Player.STATE_READY | ||
&& playWhenReady) { | ||
Format videoFormat = player.getVideoFormat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does player.getVideoFormat()
not needed to be called from player's thread?
int bitrate = videoFormat != null ? videoFormat.bitrate : 0; | ||
|
||
long pos = currentPos; | ||
long bufferedDuration = player.getBufferedPercentage() * duration / 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread?
@@ -110,7 +122,7 @@ class ReactExoplayerView extends FrameLayout implements | |||
private ExoPlayerView exoPlayerView; | |||
|
|||
private DataSource.Factory mediaDataSourceFactory; | |||
private SimpleExoPlayer player; | |||
private volatile SimpleExoPlayer player; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is volatile used here?
No description provided.