If you don't find an answer, please click here to post your question.
Reply
Collector
Posts: 3
Registered: ‎12-27-2016
Accepted Solution

Android ExoPlayer: Behind Live Window Exception when streaming live content

Introduction
When I stream live content, the following exception is thrown
 
Below is my understanding of the issue
 
Certain streams provide segments of the video that can become unavailable after a certain period of time.
 
This segment is also known as a window and depending on the server side, it might only allow a client to stream the most recent 2 minutes but not any earlier.
 
The exception is thrown when the player attempts to request a segment that is no longer available. This can be due to the window being to small server side. It can also be due to the player having to buffer constantly making it fall behind the said window and thus trying to request a segment that is not available 
 
However, the strange issue is, when I do not use ExoPlayer i.e. I do not set the option, it works fine
 
Stack Trace
exoplayer error:com.google.android.exoplayer.BehindLiveWindowException
                                                                        com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.BehindLiveWindowException
                                                                            at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
                                                                            at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:145)
                                                                            at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:441)
                                                                            at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.os.HandlerThread.run(HandlerThread.java:61)
                                                                            at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
                                                                         Caused by: com.google.android.exoplayer.BehindLiveWindowException
                                                                            at com.google.android.exoplayer.hls.HlsChunkSource.getChunkOperation(HlsChunkSource.java:418)
                                                                            at com.google.android.exoplayer.hls.HlsSampleSource.maybeStartLoading(HlsSampleSource.java:705)
                                                                            at com.google.android.exoplayer.hls.HlsSampleSource.continueBuffering(HlsSampleSource.java:264)
                                                                            at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:127)
                                                                            at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:434)
                                                                            at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213) 
                                                                            at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                            at android.os.Looper.loop(Looper.java:154) 
                                                                            at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                                            at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 
 
Ooyala SDK Version Used
4.21.0 Released 12/15/16
 
ExoPlayer version used
r1.5.7
This is the only version which appears to work for me, th
e integration docs say 1.5.5 but this
throws a class not found exception. The sample one uses 1.5.7 which works
 
 

Accepted Solutions
Ooyalan
Posts: 20
Registered: ‎01-03-2017

Re: Android ExoPlayer: Behind Live Window Exception when streaming live content

Hello,

 

Sorry for the delay. 

So the problem is with an older version of exoplayer?. I tested the sample app that used exoplayer r1.5.7 and as you mentioned it is working fine for live streaming.

 

Regards,

Edgar Gutierrez

Ooyala Technical Support

View solution in original post


All Replies
Collector
Posts: 3
Registered: ‎12-27-2016

Re: Android ExoPlayer: Behind Live Window Exception when streaming live content

Cannot seem to edit my opening post

Expanding on using the default MediaPlayer

When MediaPlayer falls behind, it just resumes from the latest point in the stream
Ooyalan
Posts: 20
Registered: ‎01-03-2017

Re: Android ExoPlayer: Behind Live Window Exception when streaming live content

Hello,

 

Sorry for the delay. 

So the problem is with an older version of exoplayer?. I tested the sample app that used exoplayer r1.5.7 and as you mentioned it is working fine for live streaming.

 

Regards,

Edgar Gutierrez

Ooyala Technical Support

Collector
Posts: 3
Registered: ‎12-27-2016

Re: Android ExoPlayer: Behind Live Window Exception when streaming live content

Hi I just tried again with Ooyala SDK 4.25 which uses Exo Player 1.5.7

I encounter the same problem as mentioned in my opening post

 

 

 

Occasional Visitor
Posts: 1
Registered: ‎06-02-2017

Re: Android ExoPlayer: Behind Live Window Exception when streaming live content

Hi there,

 

I also encounter this issue and confirm it is not fixed in latest Ooyala SDK v4.25. Will this be fixed in the next release? Are there any workaround to prevent the crash?