Handling SMF player - player controls from Javascript APIs

May 21, 2014 at 9:13 AM

I am looking for a way if we can control player controls like play, pause button, seek bar etc... from Javascript APIs. What we want to do is, we want to fade out player controls after few seconds automatically when the cursor is on player. Currently the player hosted at http://smf.cloudapp.net/html5/html/advancedfallbacks.html does not hide player controls unless you move the mouse out of it.

Any such examples or references would be of great help.

Jul 24, 2014 at 1:59 AM
There is a ControllerVisible property if I remember well (if there is not, then use MediaPlayer class [extends SMFPlayer] from http://clipflair.codeplex.com) that has such for sure

Then you can use JavaScript Bridge to talk to the player (supposing you register the player instance with javascript bridge from Silverlight, or some other class instance from a class marked with attribute [Scriptable] that has a method to give you the player object) and set that property to false/true. To see when cursor is over player register MouseEnter/MouseExit events with it

Alternatively make SMFPlayer (or my MediaPlayer) class descendent of your own to hook the needed events and add the disappearing logic (not sure how you could fade though if you don't use custom theme or can't talk to an existing theme that does it somehow already)