Jump to content

Loading Videos in PinballY


Roadblock

Recommended Posts

  • 6 months later...

You can do it with javascript. There is a Solution for a common loading video from Richard LIncoln.
LaunchVideo.js Run launch.mp4 on game launches..
Maybe there will follow a solution for Table-Loading-Videos..

https://github.com/RichardL64/Visual-Pinball/tree/main/PinballY

T
his Version should hide wheel and loading.. Text:
Source: Pinball Y Group on Facebook. Thanks to Richard - he is a nice guy..

//

// LaunchVideo

// https://github.com/RichardL64

//

// Play video during game launch

// Plays ../PinballY/Media/Videos/Launch.mp4

//

// R.Lincoln April 2022

//

// On game launch

//

function myOverlayShow(ev) {

mainWindow.launchOverlay.bg.clear(0xff000000);

let video = gameList.resolveMedia("Videos","Launch.mp4" );

mainWindow.launchOverlay.bg.loadVideo(video);

ev.preventDefault();

}

// On game startup

// Stop the video

//

function myGameStarted(ev) {

mainWindow.launchOverlay.bg.clear(0xff000000);

}

// Overlay message

// Hide the PBY display items

//

function myOverlayMessage(ev) {

ev.hideWheelImage = true;

ev.message = "";

}

// Setup the launch hook

//

mainWindow.on("launchoverlayshow", myOverlayShow);

mainWindow.on("gamestarted", myGameStarted);

mainWindow.on("launchoverlaymessage", myOverlayMessage);

logfile.log("[LaunchVideo] Initialised");

// End

 

Edited by Retsamikit
Mistakes
Link to comment
Share on other sites

  • 4 months later...
  • 3 months later...
On 8/22/2022 at 12:09 AM, Roadblock said:

Just got back to this and tried Richard's script. Got it working!

Thanks Retsamikit and RichardL64.

 

Hello mates.
Im using LaunchVideo.js script on my PinballY machine but something its going wrong.

I have the files into correct path: PinballY/Media/Launch Videos/nametable (manufacturer year).mp4

 

And log file show something like this: Playing White Water (Williams 1993) This video file exists, and if it doesnt, show something like this: Playing Launch, but any video appears ...

Any idea? What im doing wrong?

 

Thanks!

Link to comment
Share on other sites

  • 4 weeks later...

Scripts are in the script folder. You can save a script as a normal txt file and rename it to *.js
Open the Main.js in a txt editor and have a look.
The Main.js is calling the scripts you want to use with:
import "seamless-launch.js";
If you do not want to launch a script, it looks like this:
//import "LaunchFade.js";

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...