Sub recordBtn_Action
Dim recordingDirPath = readSettings.Get("recordingPath") As String
Dim vMixControllerUrl = "http://" & readSettings.Get("vMixWebControllerIP") & ":" & readSettings.Get("vMixWebControllerPort") &"/api/" As String
If recordBtn.Text = "RECORD" And fightNumber > 0 Then
vMixWebController1.PostString(vMixControllerUrl, "Function=StartRecording")
Try
vMixDone(vMixWebController1)
recordBtn.Text = "STOP"
fightBtn.Enabled = False
fightBtn.TextColor = disabledColor
replayBtn.Enabled = False
replayBtn.TextColor = disabledColor
Catch
Log("vMixStartRecording error:")
Log(LastException.Message)
End Try
Else
recordBtn.Text = "RECORD"
vMixWebController2.PostString(vMixControllerUrl, "Function=StopRecording")
Try
vMixDone(vMixWebController2)
Catch
Log("vMixStopRecording error:")
Log(LastException.Message)
End Try
Delay(2000)
fightBtn.Enabled = True
fightBtn.TextColor = defaultColor
replayBtn.Enabled = True
replayBtn.TextColor = defaultColor
Dim lastModifiedFile As String
Try
lastModifiedFile = getLastModifiedFile(recordingDirPath)
renameLastRecordedFile(recordingDirPath, lastModifiedFile ,addLeadingZeros(fightNumber,4) &"-"& addLeadingZeros(breakNumber,2) &".mp4")
updateFileList
Catch
Log("Rename last file error:")
Log(LastException.Message)
End Try
End If
End Sub