I'm having a tough time getting cue points to work with the new sparks VideoPlayer. In the documentation, it states that VideoDisplay has been replaced with VideoPlayer, but most of the examples on the web are for VideoDisplay.
I'm calling the usual 2 classes from the mx namespace.
then trying to dynamically add cue points like this:
I then create an instance of the CuePointManager, with myVid [type sparks VideoPlayer]
cuePointManager = new CuePointManager(myVid);
then create a new cuePt Objectwith name and time properties and try to add it as a cue point:
- myVid is the VideoPlayer instance
- myCuePointManager is an instance of CuePointManage
- cuePt is an Object with name and time
I get errors about cooercing myVid [type sparks VideoPlayer]
1067: Implicit coercion of a value of type spark.components:VideoPlayer to an unrelated type mx.controls.videoClasses:VideoPlayer
1119: Access of possibly undefined property cuePointManager through a reference with static type spark.components:VideoPlayer
Can someone please be very kind and give me a nudge in the right direction. I've been pulling my hair on it for a day now, and couldn't find any tutorials specifically on the new sparks VideoPlayer and how to add dynamic cue points to it.
P.S. Video is big on the web. I would say that sorting out the VideoPlayer should be one of the top priorities in the new version of the SDK.
The short answer (and the official one) is that our new Spark VideoPlayer doens't support cuePoints.
The longer answer is that as OSMF (Open Source Media Framework, which is what the Spark VideoDisplay/VideoPlayer components ship with) adds cue point support, you might be able to take a newer build of OSMF and start using cue points. Here's some info on OSMF and cuePoints: http://blogs.adobe.com/osmf/2009/11/cue_point_support_in_osmf.html . You could try taking one of their recent builds and playing around with it. In order to bring those classes in to Flex, I'd probably reccomend monkey-patching on top of spark.components.VideoDisplay and changing a few things as some of the underlying OSMF APIs that Flex is dependent on have probably changed. Then, you'd have to look at how to expose cuePoints from the spark VideoDisplay component.
Ryan, Thanks a lot. Pretty helpful nudge.