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 )
string filenameVideo videovideo = love.graphics.newVideo( videostream )
VideoStream videostreamVideo video Available since LÖVE 11.0
This variant is not supported in earlier versions.
video = love.graphics.newVideo( filename, settings )
string filenametable settingsboolean audio (false)number dpiscale (love.graphics.getDPIScale())Video video Available since LÖVE 0.10.0 and removed in LÖVE 11.0
This variant is not supported in earlier or later versions.
video = love.graphics.newVideo( filename, loadaudio )
string filenameboolean loadaudio (nil)Video video Available since LÖVE 0.10.0 and removed in LÖVE 11.0
This variant is not supported in earlier or later versions.
video = 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–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.newVideo