I need to build a super simple App for our aquarium exhibit space.
Basically we just need the iPad to play back a video full-screen, on a permanent loop, and not respond to any user input.
I have not been able to get the video playback to work. I tried creating a onComplete listener but the movie refuses to play again after the initial playback.
Here is some sample main.lua code:
local function playMyVideo()
media.playVideo( "sample.m4v", false, playMyVideo )
end
playMyVideo()
This of course causes a stack overflow on the Corona simulator because it does not provide native video feedback but should not be a problem on the Xcode simulator.
Any suggestions on what to do?
Someone else who was having this issue found that at present you should set a very brief delay using a timer between plays, I believe. :)
Thanks Peach.
I tried it and it is sill not working:
local function executeDelay()
timer.performWithDelay ( 10000, playMyVideo )
end
local function playMyVideo()
media.playVideo( "sample.m4v", false, executeDelay )
end
playMyVideo()
I'll keep trying stuff
Hey there,
I actually just tested this on .591 and it worked perfectly.
I believe the issue may be that you haven't done your code right, assuming you've done what is showing above - you need to use a forward declaration.
Try this;
1
2
3
4
5
6
7
8
9
10
11
| local playMyVideo
local function executeDelay (event)
timer.performWithDelay ( 10000, playMyVideo, 1)
end
playMyVideo = function()
media.playVideo( "sample.m4v", false, executeDelay )
end
playMyVideo() |