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