I am building a video app using native.newvideo to load in videos based on menu selections.
I have one video that contains audio and I didn’t see any reference to that in the API. Currently I get no audio, didn’t know if I had to manually set volume or something like that…
local video = native.newVideo( 0, 0, 1024, 768 )
local function videoListener( event )
if event.errorCode then
native.showAlert( "Error!", event.errorMessage, { "OK" } )
end
if event.phase == "ended" then
director:changeScene( "menu", "crossfade" )
end
end
video:load( "video/b221/video.mp4")
video:seek( 0 )
video:addEventListener( "video", videoListener )
video:play()
local function onTap( event )
Runtime:removeEventListener( "tap", onTap )
director:changeScene( "menu", "crossfade" )
end
Runtime:addEventListener( "tap", onTap );
[import]uid: 150370 topic_id: 33026 reply_id: 333026[/import]