CPVideoSpriteListener

Listener for CPVideoSprite playback.

You can add and remove this listener to video sprite using CPVideoSprite.addListener and CPVideoSprite.removeListener methods.

Video support consists of three key components:

Video is defined as a sequence of same-sized frames where each frame is an image. CPVideoSprite provides rendering of that video while CPVideoSpriteListener allows the video playback to synchronize with other action in the game like sound or animation. Note that video sprite does not provide any playback controls out of the box.

Here's some useful links for ASCII video in general:

See also:
Example:

See CPVideoExample class for the example of using video support.

Source:
CPVideoSpriteListener.scala
class Object
trait Matchable
class Any

Value members

Abstract methods

def onFrame(vid: CPVideo, frameIdx: Int, frame: CPImage, playing: Boolean): Unit

Called on each video frame.

Called on each video frame.

Value parameters:
frame

Video frame.

frameIdx

Video frame index.

playing

Whether or not playback is playing.

vid

Video that video sprite is playing.

Source:
CPVideoSpriteListener.scala