2016-09-29 35 views
4

ライブビデオ(HLS)を再生しているときにこの例外が発生しました。ライブHLSビデオの再生時にBehindLiveWindowExceptionを与えるExoplayer(2.0.0)

com.google.android.exoplayer2.source.BehindLiveWindowException 
    at com.google.android.exoplayer2.source.hls.HlsChunkSource.getNextChunk(HlsChunkSource.java:255) 
    at com.google.android.exoplayer2.source.hls.HlsSampleStreamWrapper.continueLoading(HlsSampleStreamWrapper.java:313) 
    at com.google.android.exoplayer2.source.CompositeSequenceableLoader.continueLoading(CompositeSequenceableLoader.java:55) 
    at com.google.android.exoplayer2.source.hls.HlsMediaPeriod.continueLoading(HlsMediaPeriod.java:198) 
    at com.google.android.exoplayer2.ExoPlayerImplInternal.maybeContinueLoading(ExoPlayerImplInternal.java:1080) 
    at com.google.android.exoplayer2.ExoPlayerImplInternal.handleContinueLoadingRequested(ExoPlayerImplInternal.java:1067) 
    at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:289) 
    at android.os.Handler.dispatchMessage(Handler.java:98) 
    at android.os.Looper.loop(Looper.java:135) 
    at android.os.HandlerThread.run(HandlerThread.java:61) 
    at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 

答えて

6

Googleのバージョン2.0は、ライブHLS再生では非常に不安定です。だから私はLive HLSプレイのために2.0に切り替えるのはお勧めしません。 BehindLiveWindowExceptionの問題が発生しました.Googleは引き続きこの問題をLive HLSの検索機能の一部として修正しようとしています。

ここステータスを追跡してください:一時的な修正として https://github.com/google/ExoPlayer/issues/1782

をuは(onErrorを再びpreparePlayer()を呼び出すことができます)。

@Ovierride 
public void onError(Exception e) { 

    if (e instanceof ExoPlaybackException 
      && e.getCause() instanceof BehindLiveWindowException) { 
     preparePlayer(true); 
    } 
} 
関連する問題