Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this .
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 1:22 pm
Hi!
I am new to Love, and i try to play a video. But it want play, only a love error window pop up.
I use this code:
Code: Select all
function love.load()
video = love.graphics.newVideo("myvideo.ogv")
video:play()
end
function love.draw()
love.graphics.draw(video, 0, 0)
end
What i do wrong?
Attachments
Aladdintest.love
Aladdin video test .love file (2 MiB) Downloaded 48 times
Last edited by
Nutte on Sat Feb 27, 2016 3:09 pm, edited 1 time in total.
Robin
The Omniscient
Posts: 6506 Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:
Post
by Robin » Sat Feb 27, 2016 2:51 pm
Could you upload the .love (so zip your main.lua with your myvideo.ogv)?
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 3:07 pm
Sure!
Attachments
Aladdintest.love
Aladdin video test .love file (2 MiB) Downloaded 66 times
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 3:49 pm
Why the video file not play?
Robin
The Omniscient
Posts: 6506 Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:
Post
by Robin » Sat Feb 27, 2016 4:25 pm
Huh, it plays fine for me. If you play the video in your standard videoplayer, does it work normally?
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 4:27 pm
Robin, do you run the Aladdintest.love file?
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 4:31 pm
The videofile "myvideo.ogv" run fine in my standard videoplayer.
pgimeno
Party member
Posts: 3548 Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » Sat Feb 27, 2016 4:33 pm
The attached .love works fine for me too. What does the error message say?
Nutte
Prole
Posts: 32 Joined: Sat Feb 27, 2016 1:08 pm
Post
by Nutte » Sat Feb 27, 2016 4:47 pm
Its say:
error
main.lua:2: attempt to call field 'newVideo' (a nil value)
Traceback
main.lua:2 in function 'load'
[C]: in function 'xpcall'
Sorry for my bad english.
slime
Solid Snayke
Posts: 3132 Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:
Post
by slime » Sat Feb 27, 2016 5:12 pm
[wiki]love.graphics.newVideo[/wiki] was added to LÖVE in version 0.10.0, so you'll have to use the latest version (0.10.1 preferably) to make it work.
We host the LÖVE downloads using Bitbucket, but unfortunately they're having issues with some of their downloads today – I've rehosted 0.10.1 for Windows and OS X on Dropbox temporarily:
Mac OS X
Windows installer:
32 bit ,
64 bit
Windows zip:
32 bit ,
64 bit
Users browsing this forum: Google [Bot] and 86 guests