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

5.2.1 Changes #38

Open
wants to merge 75 commits into
base: copy_5.2.1
Choose a base branch
from
Open

5.2.1 Changes #38

wants to merge 75 commits into from

Conversation

AdityaPrakash04
Copy link

No description provided.

};
forceReload = () => {
if (Platform.OS === 'ios') {
// TODO iOS

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.');

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;

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();

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();

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;

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;

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?

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

Successfully merging this pull request may close these issues.

10 participants