videoPriority(new priority)

From pinHeck Wiki
Jump to: navigation, search

Sets the currently playing video's priority to a new value.

Example:

videoPriority(0); //Sets value to 0 so anything can easily override currently playing video


This function is useful when starting / ending a ball. Consider this:

A 255 priority video is playing.

Ball drains.

videoPriority(0); sets whatever is playing to 0.

The drain video is played at a priority of 1. This will override the previous video which we just set to 0.

When a new ball starts, we can have a looping SHOOT BALL animation at priority 2. Then, once the ball does pretty anything, it will cancel out the looping SHOOT BALL video.

By manually setting the priority low, it makes it easier to ensure new videos can override what is playing.