Seek/Progress Bar

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

birwin2
Posts: 10
Joined: Sat May 09, 2015 4:47 pm

Seek/Progress Bar

Post by birwin2 »

First let me apologize for my faux pas' in my previous post. I guess I may have broken some forum rules.

Ok, so I am developing an addon that will display, in a separate window, 5 tracks from the Now Playing playlist. The current playing track is at the top, followed by the next 4 tracks. The window updates as the playlist progresses.

I am using the Metro M (Classic) skin, and in the Media Monkey main window, near the bottom, is a seek/progress bar and some other elements that I would like to also have displayed on my new window:

Image

I'd like to add everything shown, except the user rating stars, to my addon window. Is it possible to have these elements functioning in a separate window?

Bill Irwin
Richmond, VA
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Seek/Progress Bar

Post by drakinite »

Hi there, sorry for taking a long time to reply.
You can definitely do that. But since each skin overrides player.html, you shouldn't copy and paste the code from player.html. Instead, you should use the global function includeHTML (from mminit.js). Here's a working sample:

In dlgCustom.html:

Code: Select all

<html class="dialog">
<script src="file:///mminit.js"></script>
<script src="dlgCustom.js"></script>

<body data-posSaveName='dlgCustom' data-defaultSize='70em,50em'>

	<div data-id="playerParent"></div>
</body>

</html>
In dlgCustom.js:

Code: Select all

window.whenReady(() => {
	var playerParent = qid('playerParent');
	
	includeHTML(playerParent, 'player.html');
	initializeControls(playerParent);
});
First you use includeHTML to load player.html into the new parent element; then you use initializeControls to initialize the player control.
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Post Reply