-
1. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 10, 2013 12:28 PM (in response to Peter Heimelin)I've encountered the same problem as I had to develop a 'seekTo' feature in our custom implementation of Strobe.
You can't seek until play is fired. By then, it's too late to jump to time and it looks clonky, plays the 0 position and jumps to the desired spot.
The fact is that seek is ignored if "mediaPlayer.canSeek" is false. It becomes true when the media gains seek trait...
Now that I think about it, maybe calling "load()" on the load trait prior to calling seek on the player would do that (that's if there's no error on the media load).
In essence, you want to get the media to connect to the stream manually by calling load on the load trait. I figure that would work, but haven't tried yet...
-
2. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 11, 2013 11:13 AM (in response to the Masked Mushroom)Found It!
Media won't have seek trait if never played, so you can't get the player to seek when its 'canSeek' property is false. But you can force the seek trait to seek when it becomes available, and that happens before "playing".
1- Listen for MediaElementEvent.TRAIT_ADD
2- Catch the MediaTraitTypes.SEEK traitType on the event
3- Seek Directly on the seek trait at that moment
Voilà, no jumping around!
-
3. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 11, 2013 12:46 PM (in response to the Masked Mushroom)Well, catching the seek trait add event works for RTMP streaming, but craps out for HDS.
When I say crap out, here's what happens:
- the scrubber is at the left edge, yet the stream is playing from the seeked time
- Time widget reports that the stream is full duration and that the current time started from 0 (when in fact it started from 0 + seeked time)
- Gets worse when dynamic switching happens. The switched stream doesn't play from the same time...
- Also, the stream seams to have been subclipped, but the scrubbar doesn't report that. Click seeking to ' time > (total duration - seeked time) results in stream completion
-
4. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 11, 2013 1:03 PM (in response to the Masked Mushroom)There's a solution for the crapping out in HDS:
http://forums.adobe.com/message/4641950#4641950
Applied it, works like a charm.
There you go, a solution that works.
-
5. Re: Bug when seeking in "ready"-event?
Peter Heimelin Jul 12, 2013 2:07 AM (in response to the Masked Mushroom)Thanks a lot, I'll try that!!
-
6. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 12, 2013 9:22 AM (in response to Peter Heimelin)Maybe click "Was this helpful? Yes"... Stroke my aching ego...?
-
7. Re: Bug when seeking in "ready"-event?
Peter Heimelin Jul 12, 2013 9:24 AM (in response to the Masked Mushroom)Did that before you asked!
-
8. Re: Bug when seeking in "ready"-event?
the Masked Mushroom Jul 12, 2013 9:25 AM (in response to Peter Heimelin)Cool, thanks.
