0 Replies Latest reply on Jul 11, 2013 12:29 PM by ramashish13

    How to handle DRM_AUTHENTICATE Event in VideoElement




      I'm building a player that should be able to play DRM protected Videos. To do this, I'm using org.osmf.elements.VideoElement along with spark VideoPlayer. I need to listen to DRM_AUTHENTICATE event and supply the credentials for DRM.


      How should I go about doing this? I've tried adding the event listeners on VideoElement object, but it seems VideoElement doesn't dispatch DRM_AUTHENTICATE. NetStream seems to dispatch it, but I didn't find a way to get NetStream object from VideoElement.


      Here is a sample code that I'm using-


      var netLoader:NetLoader = new NetLoader();

      var videoElement:VideoElement = new VideoElement(new URLResource(path), netLoader);

      // The below doesn't work, the registered listeners do not get called for DRM video

      videoElement.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, setDRMCredentials);

      videoElement.addEventListener(DRMAuthenticationErrorEvent.AUTHENTICATION_ERROR, onDRMAuthenticationError);

      videoPlayer.source = videoElement;



      Thanks in advance,