if not video:isPlaying() then
if video:tell() > 0 then video:rewind() end
video:play()
end
I never used the video functionality, so this is just an untested idea. Also I don't know if you need to rewind the video after it ends or if this happens automatically so I added the extra loop to make sure it does.
Fun fact: 0.10.1 has a bug in isPlaying() causing it to sometimes not return whether or not the video is actually playing. This is fixed in the next release though (there's also a thread about it on this forum).
As far as I understand it, the bug was caused by an extra audio frame. Doesn't matter to me, since there's no audio in my video.
Now, a second question - How do I stop the thing from playing? I found only a "pause" command, I need the entire video to be purged when I press a button (which also changes the state).
Works as expected for me.
Double check that you don't use an older version of LÖVE accidentally.
Try using "l" instead of 1 or use love.getVersion() and print it.
Actually, switching the 1 to an 'l' did the trick. Looks like it was just a version difference I suppose. Thanks!
zerocoolisgod wrote:Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
It's a "wont" not a "cant". Its a limitation so that users/players have some peace of mind when running löve games and so programmers dont have to handle all the different platforms and savegame logic themselves.
zerocoolisgod wrote:Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
It's a "wont" not a "cant". Its a limitation so that users/players have some peace of mind when running löve games and so programmers dont have to handle all the different platforms and savegame logic themselves.
It's also a "can't". The game directory is zipped in most cases when the game is run on other machines. Plus, in many cases the game won't even have write permission from the OS to the folder containing the zip file!
That all makes sense. I just like the idea of save games and configs being in the game directory. Even something like a block data file like a virtual disc or something, and only being able to write to it. But you'd still need write permissions for that so idk. It's a minor gripe, but I understand wanting to protect players from jerks writing malware into love games.
I can't seem to get love.filesystem.createDirectory to work with a .love file on android. Do I need to pack my app into a .apk file first? EDIT
Nevermind, didn't see t.externalstorage had to be set to true
Last edited by CapitalEx on Tue Apr 05, 2016 12:22 am, edited 1 time in total.
I've been playing a game that uses love2d and it was running fine until recently. Now the game can only run when my laptop is plugged into my tv through an hdmi cable. Without it double clicking on the .exe/trying to run it results in nothing happening. Any idea on what could cause this and how to fix this?