Module LoveVideo

LoveVideo is a video module for LÖVE.

Info:

  • Copyright: 2014
  • License: Apache 2.0
  • Author: Josef N Patoprsty [2014],Philipp Überbacher [2014],flashkot [2012]

Functions

lovevideo.newVideo (target, srgb) Instantiate a new instance of the video player.
lovevideo:update (dt) Updates the instances internals.
lovevideo:draw (x, y, sx, sy) Draw the instance on the screen.
lovevideo:isDone () Determines if the instance has ended.
lovevideo:setOnDone (func) Set the function to be called when the video finishes.
lovevideo:isPlaying () Determines if the instance is playing.
lovevideo:stop () Stop the current instance.
lovevideo:setSpeed (speed) Sets the speed of the current instance.
lovevideo:getSpeed () Gets the speed of the current instance.
lovevideo:pause () Pause the current instance.
lovevideo:resume () Resume the current instance.
lovevideo:getWidth () Get the width of the video.
lovevideo:getHeight () Get the height of the video.
lovevideo:getDimensions () Get the current dimensions of the video.
lovevideo:getAudio () Gets the current audio Source
lovevideo:isCompressed () Determines if the current instance is using a compressed format (e.g.


Functions

lovevideo.newVideo (target, srgb)
Instantiate a new instance of the video player.

Parameters:

  • target Required The directory that should be loaded.
  • srgb Optional Enable the srgb color space. No trailing forwardslash.
lovevideo:update (dt)
Updates the instances internals.

Parameters:

  • dt Required The delta time from love.update
lovevideo:draw (x, y, sx, sy)
Draw the instance on the screen. This function imitates love.graphics.draw.

Parameters:

  • x Optional The position to draw the instance (x-axis). [0]
  • y Optional The position to draw the instance (y-axis). [0]
  • sx Optional Scale factor (x-axis). [1]
  • sy Optional Scale factor (y-axis). [1]
lovevideo:isDone ()
Determines if the instance has ended.
lovevideo:setOnDone (func)
Set the function to be called when the video finishes.

Parameters:

  • func Required the function to be called when the current instance finishes.
lovevideo:isPlaying ()
Determines if the instance is playing.
lovevideo:stop ()
Stop the current instance.
lovevideo:setSpeed (speed)
Sets the speed of the current instance.

Parameters:

  • speed Required The multiplier at which the speed should play.
lovevideo:getSpeed ()
Gets the speed of the current instance.

Returns:

    speed of current instance.
lovevideo:pause ()
Pause the current instance.
lovevideo:resume ()
Resume the current instance.
lovevideo:getWidth ()
Get the width of the video.

Returns:

    the video width
lovevideo:getHeight ()
Get the height of the video.

Returns:

    the video height
lovevideo:getDimensions ()
Get the current dimensions of the video.

Returns:

    the video width, the video height
lovevideo:getAudio ()
Gets the current audio Source

Returns:

    the audio Source
lovevideo:isCompressed ()
Determines if the current instance is using a compressed format (e.g. dds)

Returns:

    boolean of whether the video is compressed
generated by LDoc 1.4.2