Does anyone know if there’s a way to use onComplete/controllers with native video? Usual syntax doesn’t work.
Graphics 2.0 and Composer don’t work properly with media.playVideo.
Graphics 2.0 and director 1.3 work with native video, if I can remove the video when it ends or when user touches ‘Done,’ assuming it’s possible to show controls. Right now, next module loads when video ends, but is hidden behind the video’s last frame.
video:removeSelf() works too quickly to be useful with no onComplete function.
Thanks for any help you can give.
Here’s the current code:
[lua]
module(…, package.seeall);
function new()
local localGroup = display.newGroup();
local bg = display.newImage( “bgmov.png” )
bg.x = _W/2; bg.y = _H/2;
function onComplete ( e )
video:removeSelf();
end
function newVideoIntro()
local video = native.newVideo( _W/2, _H/2, 1024, 768 );
video:load( “media/test.mov” );
video:play(“media/test.mov”, true, onComplete);
director:changeScene( “menu” , “fade” )
end
tmr = timer.performWithDelay( 1000, newVideoIntro, 1 )
localGroup:insert(bg);
return localGroup;
end
[/lua]