0 Replies Latest reply on Feb 10, 2010 11:43 AM by agitcraft

    Async Errors in Sprint 8

    agitcraft

      Hey guys! I'm currently developing a wrapper for OSMF using the Sprint 8 build and I'm having some serious issues working with video with cuepoints.

       

      I'm currently creating video elements and adding listeners to their traits as they are added using the MediaElementEvent.TRAIT_ADD event. I'm also listening for metadata using the MetadataEvent.FACET_ADD events.

       

      I'm responding to the LoadEvent.LOAD_STATE_CHANGE event on my LoadTrait by attempting to add handlers to my video element's client when the LoadState is "READY." the code looks like this...

       

      private function _videoLoadStateChange(e:LoadEvent):void {
               switch (e.loadState) {
                     case LoadState.READY:                       
                              var client:NetClient = new NetClient();
                              client = _element.client;
                              client.addHandler(NetStreamCodes.ON_META_DATA, _elementMetaHandle);
                              client.addHandler(NetStreamCodes.ON_PLAY_STATUS, _playStatusHandle);
                    
              }

      }

       

      private function _elementMetaHandle(value:Object):void {
                  trace("ELEMENT META HANDLE");
      }
             
      private function _playStatusHandle(value:Object):void {
                  trace("PLAY STATUS HANDLE");
      }

       

      The problem is that any time I attempt to load a video with any kind of cuepoint metadata, I get an AsyncErrorEvent.

       

      Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=TypeError: Error #1034: Type Coercion failed: cannot convert Object@261c6c69 to Array.
          at org.osmf.net::NetLoader/createNetStream()
          at org.osmf.net::NetLoader/finishLoading()
          at org.osmf.net::NetLoader/startLoadingHTTP()
          at org.osmf.net::NetLoader/load()
          at org.osmf.traits::LoadTrait/load()
          at org.osmf.media::MediaPlayer/load()
          at org.osmf.media::MediaPlayer/updateTraitListeners()
          at org.osmf.media::MediaPlayer/set element()
          at org.osmf.display::MediaPlayerSprite/set element()
          at com.ignitehealth.osmf::Player/load()
          at Main/_init()
          at Main()

       

      The video fails to display, but the audio plays and the cuepoints are fired off and handled by some additional code I have set up. I haven't seen any information on how to deal with this problem other than to call the "addHandler" method on the video element's client object. I even saw a thread where somebody claimed this fixed their problem in Sprint 8.

       

      Are there other considerations I've failed to take here? I can't figure out for the life of me why this is happening and it's making me want to pull my hair out. I can provide additional code samples if that would clarify the issue. Any help would be GREATLY appreciated!