Thanks to useful help of Jomit, I managed to add an overlayer for the video.Here’s what I did : First : ensure that you have a reference the mediaplayer.js in your master page (if you want to reuse it in more than one page layout / page)
(and don’t forget to end your script tag with a </script>, I spent several hours trying to understand why a <script … /> was not loading …Second : once the dom is loaded / ready (this is required otherwise the getElementById will return null and end the attachToMediaLinks function) trigger this :
‘overlay_movies’ is the temporary div that I gave while testing, in my rendering I have something like :
a sample movie<br/>
There comes a nice overlay player when you click on a media (with one of the extensions specified as parameter) in that div.