Hacking the Flex VideoDisplay component
I blogged earlier that the VideoDisplay component in Flex was lacking a few methods and properties. Specifically I missed the clear() method and other properties found with the NetStrem object. I found out that if you do a little hacking, you can expose more functionality.
Adobe supplies the source code for mx.controls.VideoDisplay. In there you will see a mx_internal property called videoPlayer. Jedi Master Lanny McNie (gskinner.com) pointed me to this site as a clue to how I can access this property. Example:
myVideoDisplay.mx_internal::videoPlayer.playheadTime = 30;
You will notice that the VideoPlayer class extends flash.media.Video and it has the private NetStream property and public methods/getters/setters to expose the NetStream functionality. For example, you can seek() through the NetStream object using a setter called playheadTime.
