local videoPath = "videos/stressCutscene.ogv" local song local videoStream local video local module = {} function module.onCreate(songName) if songName == "Stress" then module.shared.canStart = false song = songName videoStream = love.video.newVideoStream(love.filesystem.newFile(videoPath)) videoStream:play() video = love.graphics.newVideo(videoStream) video:play() end end function module.onUpdate() if videoStream then if not videoStream:isPlaying() then module.shared.canStart = true video = nil videoStream = nil end end end function module.onDraw() if video then love.graphics.draw(video, 0,0,0,1.5,1.5) end end function module.onClose() if video then video:stop() video:release() video = nil videoStream:stop() videoStream:release() videoStream = nil end end return module