native video -- onComplete option? controllers?

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]

Making progress re: forcing onComplete to enable successful transitions in and out of video module … so far:

  • moved local video declaration outside newVideoIntro to extend scope

  • added video:play-synched videoTimer mirroring movie length; calls onComplete function

Excerpt:

[lua]      

    local video; 

      

    function onComplete ( e )

       video:removeSelf();

        director:changeScene( “menu” , “fade” )

    end

    function newVideoIntro()

        video = native.newVideo( _W/2, _H/2, 1024, 768 );

        video:load( “media/test.mov” );

        video:play(“media/test.mov”);

        vidTmr = timer.performWithDelay( 142000, onComplete, 1)

    end

[/lua]

Extremely inelegant, but it works. Video of this length is useless without controls - horrible user interface design. Vaguely remember reading that there may not be controls for native; but, that can’t be right. Anyone know about this? Thanks.

Making progress re: forcing onComplete to enable successful transitions in and out of video module … so far:

  • moved local video declaration outside newVideoIntro to extend scope

  • added video:play-synched videoTimer mirroring movie length; calls onComplete function

Excerpt:

[lua]      

    local video; 

      

    function onComplete ( e )

       video:removeSelf();

        director:changeScene( “menu” , “fade” )

    end

    function newVideoIntro()

        video = native.newVideo( _W/2, _H/2, 1024, 768 );

        video:load( “media/test.mov” );

        video:play(“media/test.mov”);

        vidTmr = timer.performWithDelay( 142000, onComplete, 1)

    end

[/lua]

Extremely inelegant, but it works. Video of this length is useless without controls - horrible user interface design. Vaguely remember reading that there may not be controls for native; but, that can’t be right. Anyone know about this? Thanks.