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

SimpleExoPlayerView grainy/distorted when setting player #2305

Closed
sheaam30 opened this issue Jan 8, 2017 · 1 comment
Closed

SimpleExoPlayerView grainy/distorted when setting player #2305

sheaam30 opened this issue Jan 8, 2017 · 1 comment

Comments

@sheaam30
Copy link

sheaam30 commented Jan 8, 2017

I'm attempting to seamlessly switch video from 1 SimpleExoPlayerView to another.

In the first I am playing an HLS video:

BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveVideoTrackSelection.Factory(bandwidthMeter);
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);
LoadControl loadControl = new DefaultLoadControl();
exoPlayer = ExoPlayerFactory.newSimpleInstance(textureVideoView.getContext(), trackSelector, loadControl);

Handler mainHandler = new Handler();
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(App.getApp(),                Util.getUserAgent(App.getApp(), "Agent"));
MediaSource hlsSource = new HlsMediaSource(sourceUri, dataSourceFactory, mainHandler, null);
return new LoopingMediaSource(hlsSource);

exoPlayer.prepare(new LoopingMediaSource(hlsSource));
exoPlayer.setPlayWhenReady(true);

I'm trying to keep the video in it's current state and swap the view that the player is using by calling simpleExoPlayerView.setPlayer(exoPlayer). The video switches to play in the second view but it shows up as black/grainy initially and after a few seconds clears up.

  • Using ExoPlayer version 2.1
  • Seeing this on Pixel XL 7.1.1

grainy

@ojw28
Copy link
Contributor

ojw28 commented Jan 8, 2017

This is a duplicate of #2093.

@ojw28 ojw28 closed this as completed Jan 8, 2017
@ojw28 ojw28 added the duplicate label Jan 8, 2017
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants