0 Replies Latest reply on Aug 17, 2011 11:51 AM by csmaller

    getting Client information on a ProxyElement

    csmaller

      Ok, i have spent two days on this.  I have an Akamai multi bitrate  HD DVR  live stream (3 streams at different bitrates)

      Now, normally you would have a VideoElement and a client attached to that element that you can grab information from, like this:

       

                if (e.mediaElement is VideoElement)
                  {
                     
                      var videoElement:VideoElement = e.mediaElement as VideoElement;
                     
                      videoElement.client.addHandler(NetStreamCodes.ON_META_DATA, _onMetadata);
                     
                  }

       

      but when you use multibitrate streams the media element is a ProxyElement (after you implement the AkamaiAdvancedPlugin) plugin and therefore you cannot grab the NetStream/client information (no client on ProxyElement). this code is based on Akamais example on how to implement multi bit rate streams:

       

                var resource:StreamingURLResource = new StreamingURLResource("http://www.example.com/example.smil", StreamType.LIVE_OR_RECORDED);
                  var hdMBRObjects:Array = createHDBRObject();   //akamai code which creates an hdMBRObject for switching between streams
                 
                  AkamaiMediaUtils.addAkamaiMediaTypeToResource(resource, AkamaiStrings.AKAMAI_MEDIA_TYPE_HDN_MBR, hdMBRObjects);

                 addMetadata(resource);

      //custom media factory to create the mediaElement
                  _mediaElement = _mediaFactory.createMediaElement(resource);

       

      everything works fine, the stream loads and the archive stream loads if the stream is off. But i want the player to FORCE live stream (or not force it depending on the client) so if it is not LIVE then dont show the archive.   This is imperative for our clients to be able to stop archives from showing.....

       

      Now, the isLive variable comes in with the stream and using Charles I see all the metadata coming in ('onMetaData', 'isLive:true  etc etc)    but I cannot find any way of grabbing that metadata .  Im going a little bonkers over here trying to find the answer. So near and so far away.

      please help!

       

       

       

      I have created a customMediaFactory extending the AkamaiMediaFactory trying to catch the netStream object to no avail.