1 person found this helpful
You are basically on the right track. You can implement your own overlay element that implements IMediaReferrer interface. The implementation of your IMediaReferrer interface can decide whether to refer to a given media element in the canReferenceMedia function and then get a hold on the media element in the addReference function. Once you have the referred media element, you are free to explore its metadata. Whether you want to package your overlay element as a plugin or directly link into your application is totally up to you. Without looking into the actual code, I am unable to tell why you cannot retrieve the targe video element's metadata. If you want, you may send me your source code and I can take a look of it for you. My email address is email@example.com
Senior Computer Scientist
Adobe Systems Inc.
With some more tweaking, I am able to get and use the layout metadata as you said! Here is where my issue stands now:
* My IMediaReferrer element can now look at the layout metadata of the target media element and copy those values, so it has the same width, height, x, and y properties. This is great!
* However, particularly for RelativeLayoutFacet metadata, this is only fully useful if both the target media element and my IMediaReferrer element are in the same composition. If they are in different compositions which are themselves placed differently, then even identical x and y values don't add up to the same position on the screen.
So, my challenge is to figure out how to ensure that my IMediaReferrer element is placed in the same composition as the target media element.
Again, the goal is to write a plugin that will have a reference to an underlying video, and will always have the same width, height, x, and y of the video it is overlaying. This plugin should not require any additional coding in the player, but should take care of setting itself up as above automatically when loaded.
There isn't any property on a media element which exposes the "parent" composition element that it is a part of, so I don't know how to get my IMediaReferrer to add itself to the same composition as the reference target automatically. I'm not sure if it's possible to make my IMediaReferrer element extend ParallelElement and still load in a SWF Element as an overlay, and add that SWF Element and the target Media Element as children with identical layout metadata.
Do you have any suggestions on how I should proceed?