Available since LÖVE 0.10.0
This function is not supported in earlier versions.
Creates a new drawable Video. Currently only Ogg Theora video files are supported.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
video = love.graphics.newVideo( filename, loadaudio )
string filenameboolean loadaudio (nil)Video videovideo = love.graphics.newVideo( videostream, loadaudio )
VideoStream videostreamboolean loadaudio (nil)Video videoLoad and play a video.
function love.load()
video = love.graphics.newVideo("myvideo.ogv")
video:play()
end
function love.draw()
love.graphics.draw(video, 0, 0)
end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.newVideo