Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music Controls Addon #18

Open
mhassall opened this issue Oct 13, 2021 · 3 comments
Open

Music Controls Addon #18

mhassall opened this issue Oct 13, 2021 · 3 comments

Comments

@mhassall
Copy link

I've developed a music-controls addon which might be of interest to the group. I've only been able to test it on my Windows 10 cab so not sure how it will perform on other versions.

  • Create a new folder "Jukebox" under your PinballY "Media" folder
  • Place music files into this Jukebox folder directly or organise your music into Artist/Albums using sub-folders to replicate your iTunes library.
  • Optionally place an iTunes "library.xml" file into the Jukebox folder to display album/artist/song data
  • Optionally include a "cover.jpg" in the same folder as your song file to display album cover art in the "Now Playing" popup and Media Window

It also works well with "wheel-actions" to create a jukebox feel to your cab. Simply create a new .js (jukebox.js) file, import showMusicMenu and pathJukeBox and call showMusicMenu(pathJukeBox)

music-controls.zip

@blautob
Copy link

blautob commented Oct 17, 2021

@mhassall Cool. Will give this a try.
Does it work with music videos as well??

@mhassall
Copy link
Author

If you update lines 156 and 263 to include .avi files in the search then yes. But this addon hasn't been optimised for video playback, so there could be issues with fullscreen mode, window placement and window closing when complete.

I would use the PinballY built-in function layer.loadVideo(filename, options) instead so I could clear the layer when the video finishes playing. You would check the file extension before playing, if .mp3 then use existing play code, else if video file then layer.loadVideo()

@blautob
Copy link

blautob commented Oct 19, 2021

Cool thanks for the explanation.
The second part "layer.loadVideo" however by far exceeds my skills. Maybe you have fun checking this out on a cold and rainy October day. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants