1 Reply Latest reply on Nov 10, 2009 8:27 PM by bringrags

    the Plugin based on OSMF API but player not developed by OSMF

    lllgy Level 1

      Hi,

      Now the main player is developed by OVP or other players, but the plugin is based on OSMF API. I

      want to pass a object to the plugin, then the plugin can accept the object and process it.

      For example, I run the GGTrackingPlugin sample and produce a plugin named GGTrackingPlugin.swf.

      My player is OVP or JW player because it supports the plugin's structure. Then when I click the

      "PLAY" button in my player, I hope that the plugin can listen to the change event from the main

      player. So the plugin need to provide the main player with the interface so that the plugin can

      get media information which is defined in the player, then the plugin creates a MediaElement

      according to the MediaInfo.

      How can I implement this interface? What can I do to define and get the MediaInfo?

      Hope your helps.

      Thanks

        • 1. Re: the Plugin based on OSMF API but player not developed by OSMF
          bringrags Level 4

          Plugins aren't intended to work with non-OSMF players, and making them do so would be a lot of work.  But if you absolutely have to try, I'd recommend wrapping your non-OSMF player in a ProxyElement, and mapping the MediaElement API calls into your custom API.  For example, if the client of your ProxyElement calls play() on the ProxyElement's IPlayable trait, then your implementation of play() could call the corresponding method on your non-OSMF player.  Similarly, if the non-OSMF player dispatches an event, your ProxyElement could catch it and translate it into a MediaElement event.

           

          All that being said, this is highly theoretical, and presupposes that you can map every OSMF method and event into a method or event on your custom player.  It's likely this will only get you so far.