Type String Event completion Revision Release 2025.3721 Keywords completion, url
When the completion event is dispatched after a user has selected or captured a video with media.captureVideo() or media.selectVideo(), this property indicates the URL to the video file. You can use this URL in native.newVideo() or media.playVideo().
-- Video completion listener
local onVideoComplete = function( event )
print( "video session ended" )
end
-- Capture completion listener
local function onComplete( event )
if event.completed then
media.playVideo( event.url, media.RemoteSource, true, onVideoComplete )
print( event.duration )
print( event.fileSize )
end
end
if media.hasSource( media.Camera ) then
media.captureVideo( { listener=onComplete } )
else
native.showAlert( "Corona", "This device does not have a camera.", { "OK" } )
end