I want to hook into the OSMF framework and get the netstream object and later get all the netstream status messages like NetStream.Play.Start, NetStream.Seek.Notify etc. I have done this for rtmp streaming using netloader package and passing TracingNetLoader as second argument in the video element used in it and then wiriting this class by extending it with RTMPDynamicStreamingNetLoader.
So can similar thing be done for http streaming also as I can see HTTPStreamingNetLoader class also but the problem is that we have to use MediaElement and not VideoElement and mediaElement only allow one parameter while instantiating it.
You should be able to take the same approach for HTTP streaming (i.e. subclass HTTPStreamingNetLoader, override createNetStream, call super.createNetStream, and then add your listeners to the NetStream you get from the base class).
But as I said above if I use VideoElement then it does play f4v files so we have to use MediaElement which only allow one parameter ie resource. How can I pass second parameter ie "new TracingNetLoader()". Can you please clarify this?
You don't use MediaElement for HTTP streamed content, you use VideoElement. (Technically, you use F4MElement, which will generate the VideoElement using a MediaFactory. So you would need to modify the MediaFactory (DefaultMediaFactory) to use your extended HTTPStreamingNetLoader instead of the default.)
You should start with register your own media info item in the media factory such as DefaultMediaFactory, where you can see how the HttpStreamingNetLoader gets used. And then replace it with your own net loader.
Senior Computer Scientist
Adobe Systems, Inc.