Only the one you've already found: wait for a couple seconds until the stream duration becomes non-zero.
Ian
On Tue, Apr 30, 2013 at 9:32 AM, Larry Meadors <larry.meadors@gmail.com> wrote:
Thanks Ian - any known workaround?
Larry
On Tue, Apr 30, 2013 at 10:28 AM, Ian Ni-Lewis <ilewis@google.com> wrote:
> This is a known issue that will be fixed in a future version of Android.
> Calling prepare() unfortunately has no effect.
> Ian
>
>
> On Saturday, April 27, 2013 12:45:33 PM UTC-7, Larry Meadors wrote:
>>
>> I'm trying to play an hls audio stream, and start playback at a specific
>> point in the stream. It's an audio book, and in trying to resume where it
>> was stopped the last time the app was used.
>>
>> I've got the time saved and I can see in the debugger that I'm restoring
>> it before starting playback, but every time, it's starting at the beginning
>> of the file.
>>
>> After debugging more, I noticed that the duration when I call seekTo is
>> always zero.
>>
>> After starting playback, the duration is accurate.
>>
>> If I call start, then call pause, then insert a delay and check the
>> duration, it eventually doors return the correct value.
>>
>> The unfortunate side effect is that it pays the beginning of the stream
>> for a second or so, and then finally goes to the correct playback position.
>>
>> Any suggestions?
>>
>> Larry
Ian Ni-Lewis
Staff Developer Programs Engineer
Android Developer Relations
Android Developer Relations
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment