apache-flexpackageflashbuilder4osmf

Resolve conflicting package name in Flash Builder


I am using Flash Builder 4 and need a VideoDisplay component that works with Cue Points. The newer version of theOSMF classes that Flex's VideoDisplay are based on handles this already. The idea is to roll my own VideoDisplay component rather than monkey patch the existing one. To do this, I have created a project with the newer version of the OSMF classes, and another project with which I would build the new VideoDisplay, in a separate package name.

The issue is that since the Flex 4.1 SDK contains the majority of the OSMF classes with their original package names, a statement such as import org.osmf.media.MediaPlayer; references the class located at

C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\frameworks\projects

and not the MediaPlayer class in the newer version of OSMF.

I've tried to rename the packages in the OSMF project so that it is distinctly named, but I get an exception from the IDE (an unexpected exception occurred during precondition checking. See the error log for more details).

Does the SDK always (rightfully?) win in a fight? Is there some (dirty?) way to force a project to prefer a reference to an swc/project over an identically named SDK class?

Any suggestions welcome.

Edit: Given the comments, I've apparently done a poor job of explaining my problem. So here it goes again.

Flex uses an older, less capable version of the OSMF platform for its VideoPlayer. I need to use the new version that includes support for cue points. I have downloaded the newer OSMF source and it is in its own project. I would prefer to NOT have to rename the packages in this project for the sake of future maintainability.

The VideoPlayer I will implement is in a second project that DOES NOT duplicate the package names of either the Flex SDK or OSMF. The conflict is between the Flex SDK and OSMF, not between the classes I would build and either OSFM or the SDK. My project needs to access classes in the OSMF project, not those from the Flex SDK that have the name package/class names. Because the Flex SDK is based on OSMF, Flex has left the package and namespace identifies intact, thus the naming ambiguity.


Solution

  • Remove OSMF from the Flex 4.1 SDK in "Flex Build Path".