I have a plug-in written in Visual Studio, C# for MM4 - it's been woring for many years now - that I'm trying to move to MM5. The plug-in gets info from the Player and writes it into Text controls in a Windows Form.
In MM5 I'm using the App.Player events, methods and properties to get the info from the Player and I managed to send it to the console.log and to a ToastMessage as in the following code:
Code: Select all
function displayTrack(event) {
if(event == 'trackChanged'){
var track = app.player.getCurrentTrack();
var nextTrack = app.player.getNextTrack();
var title = track.title;
var nextTitle = nextTrack.title;
uitools.toastMessage.show(track.title, {
disableUndo: true
});
console.log(title);
console.log(nextTitle);
};
}
app.listen(app.player,'playbackState', displayTrack);
Thank you in advance,
Marcelo