Sub avc_max_duration_reached(maxdurationreached As Boolean)
If maxdurationreached = False Then Return
modMashiane.showspinner(spinner)
Sleep(5000)
' reset the counter
LockControls(True)
lblCountDown.Text = vidLen & "s"
' get the day being saved
strDay = Starter.StateManager.getSetting("day")
' dfine the format to save the file
uFile = "user" & uid & strDay
filename = uFile & ".mp4"
' close the camera immediately
Starter.StateManager.SetSetting("picture", filename)
Starter.StateManager.SetSetting("ufile", uFile)
' show the blurred picture
'modMashiane.getimageoralternative(imgTaken, filename,"nophoto.png")
modMashiane.GetPNG(btnTakePicture,"photon.png")
'get the file and process it
Dim fLoc As String
fLoc = File.Combine(File.DirRootExternal,"Videos/" & filename)
If File.Exists("",fLoc) = True Then
'upload the file to the server
modMashiane.showspinner(spinner)
EnableDisable(False)
filename = Starter.StateManager.getSetting("picture")
dbAction.Initialize
dbAction.Put("action", "upload")
dbAction.Put("filepath", "")
Starter.httpjobs.uploadfilephp(Me,dbAction,File.Combine(File.DirRootExternal,"Videos"), filename, _
"upload", "uploadfile.php", "upload")
Else
Msgbox(modTGIF.ConnectionError, modTGIF.TrayTitle)
End If
End Sub