PinballY / PinballY-Addons-and-Examples

Collection of extensions for PinballY, the pinball game launcher.
MIT License
10 stars 4 forks source link

Music Controls Addon #18

Open mhassall opened 3 years ago

mhassall commented 3 years ago

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.

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 commented 3 years ago

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

mhassall commented 3 years ago

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 commented 3 years ago

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. :-)