Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

How to compile a JS file similar with html5.menu.js extends html5.overlay.js


Hi,
I added a setting button on the controlbar, and wrote a html5.settingmenu.js which extends html5.overlay.js, just like the html5.menu.js does. In the html5.controlbar.js, I initialized the settingmenu overlay, and the overlay box displayed.
But the elements created in the settingmenu.js can't be seen unless renaming the settingmenu.js file to menu.js. I found these lines below in ./build/build.xml:
<fileset dir="${basedir}/src/js/html5" includes="jwplayer.html5.js" />
<fileset dir="${basedir}/src/js/html5" includes="jwplayer.html5*.js" excludes="jwplayer.html5.js" />
I think that the settingmenu.js is included in the jwplayer.html5.js while the 'new html5.settingmenu(...)' in controlbar.js didn't through any error. But if I removed the settingmenu.js file, there's also no error.
How can I include the settingmenu.js file and make it work?
Help please!

5 Community Answers

Carolyn Ganon

JW Player Support Agent  
0 rated :

Hi,

I’d be happy to help you troubleshoot this issue. Would you mind sending a link to your test page where the player is embedded?

Thank you,
Carolyn

670292548

User  
0 rated :

Hi, Carolyn, thank you for your quick reply. But I'm afraid that I don't have a public server or address yet. I just want to include the html5.settingmenu.js into the jwplayer.html5.js like html5.menu.js

Thanks again,

Ethan Feldman

JW Player Support Agent  
0 rated :

You added a custom controlbar icon? This isn’t something we really support – there are no public methods or api calls for this. We only really officially support adding dock buttons.

670292548

User  
0 rated :

Okey then. Thank you all.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

This question has received the maximum number of answers.