1 person found this helpful
That's a very good question. I don't see a straight forward way to do that with the current APIs.
The reason that we have not added an owner/parent property on media element is that we wanted to avoid having a circular reference between the child and the container. We've refrained from doing an IComposed trait interface because we wanted the reserve traits for aspects that are core to the media (where parent info is more contextual in nature).
Up until now, we've always managed to do without the parent referece, however, the use case you've put forward did not come up before. We'll have to flesh out a solution for this for the sprints to come.
Makes sense. I'm experimenting to see if there is another way to achieve my use case. Currently I'm having some success using a ProxyElement. When I get a video passed in as the wrapped element, I create a parallel element and add the video and my swf overlay and set the whole composition as the wrapped element. I'm able to get the desired functionality of locking the overlay positionally and dimensionally to the video. What remains to be explored is how well this arrangement works when passing through calls / listeners that are intended for the video element. I'm not sure how they will be handled by a parallel element consisting of a SWFElement and VideoElement.
I'll let you know what I find....