event.fileSize

Type String
Event completion
Revision 2017.3060
Keywords completion, fileSize

Overview

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 file size to the video in bytes.

Example

-- 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