Ticket #364 (closed defect: fixed)
onComplete results in Flash Exception in OVA for JW5
| Reported by: | paul | Owned by: | paul |
|---|---|---|---|
| Priority: | blocker | Milestone: | OVA for JW5 (v1.0.1) |
| Component: | OVA for JW Player 5 | Version: | OVA for JW Player 5 (trunk) |
| Keywords: | Cc: | ||
| Forum thread: |
Description
If "onComplete" is setup on a JW5 player instance and the playlist is set as a "file" rather than a "playlist", a Flash Exception is thrown by JW when trying to serialise the javascript version of the clip as part of the onComplete event.
OVA is doing something to cause this:
Error: Error #1023: Stack overflow occurred.
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()
at com.longtailvideo.jwplayer.utils::JavascriptSerialization$/stripDots()

Fixed in JWPlaylistItem.sync():
Changed:
if(startTime > 0 && _stream.isSlice()) {
}
else _inPlayerPlaylistItem = _stream.customProperties.originalPlaylistItem;
to:
_inPlayerPlaylistItem = copyPlaylistItem(_stream.customProperties.originalPlaylistItem);
Always take a copy of the original playlist clip now to ensure that any additional values that may be in there (the Dynamic Class) aren't carried into the clip (causing the recursive serialisation and the stack overflow).