1 Reply Latest reply on Dec 9, 2010 10:44 AM by bringrags

    Does SerialElement need Composite Trait types?


      I've create a series of proxies which wrap around the video element. One of these proxies simply adds a custom trait of type FullScreen like so:


          override protected function setupTraits():void {

              addTrait(FullScreenTrait.FULL_SCREEN, new FullScreenTrait());




      Now this works fine if I create the video using a URLResource. However, recently I've been using the SMIL plugin in order to create a playlist to play (as a serial composition). Now my custom trait is no longer available. The structure of things as far as I can tell is:


      SMILElement (LoadFromDocumentElement Proxy) -> SerialElement -> currentChild -> Proxy (with custom trait) -> VideoElement


      So when I do getTrait on the SMILElement my custom trait is not coming through even though it is apparent that the currentChild element has this trait while debugging.


      I notice that some of the osmf traits are CompositeTraits - is this something that's required for the mechanism to work with SerialElement?

        • 1. Re: Does SerialElement need Composite Trait types?
          bringrags Level 4

          It's important to understand what traits are and what they're not:


          • Traits are not intended to be generically extensible:  there's a fixed set within the framework (although we may add additional traits in the future, to support new Flash/FMS capabilities).  We experimented with making them fully extensible, but it turned out to be not worth the cost, particularly since there shouldn't be that many traits in a media system.
          • Traits represent fundamental characteristics or capabilities of the media in its context.  For example, some media is playable (videos), other media is not (images).
          • A trait cannot apply to all media types.  If it could, then there would be no reason to model it as a trait, instead we would model it as part of the MediaElement.  Metadata is a good example of this, in that any MediaElement might have some metadata associated with it, so it wouldn't make sense to make metadata a trait.  Similarly, any MediaElement has the ability to go into fullscreen mode, so I wouldn't model the ability to go fullscreen as a trait.


          On a semi-related note, I'm often asked (inside Adobe and elsewhere) for a technical overview of OSMF.  I've posted the slides that I use for this purpose here:


          https://sourceforge.net/adobe/osmf/wiki/_discuss/thread/d6c3d719/1962/attachment/OSMF%20Ar chitectural%20Building%20Blocks.pdf


          The slides cover the fundamental building blocks of OSMF, things you are likely to use over and over if you're building complex media experiences.  They might shed some light on which different parts of OSMF should be used in which situations.