From b80a76f5ac5331803939658886a1371663cc538f Mon Sep 17 00:00:00 2001 From: Paxx Date: Thu, 29 Jun 2023 15:45:18 +0200 Subject: [PATCH] fixed the start and stop recording --- ovenmedia/ovenmedia.go | 4 ++-- ovenmedia/recording.go | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ovenmedia/ovenmedia.go b/ovenmedia/ovenmedia.go index e9dc389..2036c9b 100644 --- a/ovenmedia/ovenmedia.go +++ b/ovenmedia/ovenmedia.go @@ -26,8 +26,8 @@ type IOvenMediaClient interface { StopPush(vHost string, appName string, body RequestBodyPush) (*resty.Response, error) GetAllPushes(vHost string, appName string) (*ResponsePushes, error) // Recording - StartRecording(url string, vHost string, appName string, body RequestRecordingStart) (*ResponseRecordingStart, error) - StopRecording(url string, vHost string, appName string, body RequestRecordingStop) (*ResponseRecordingStart, error) + StartRecording(vHost string, appName string, body RequestRecordingStart) (*ResponseRecordingStart, error) + StopRecording(vHost string, appName string, body RequestRecordingStop) (*ResponseRecordingStart, error) GetRecordingState(vHost string, appName string, body *RequestRecordingStop) (*ResponseRecordingStart, error) // Stats GetStatsVhosts(vHost string) (*ResponseStats, error) diff --git a/ovenmedia/recording.go b/ovenmedia/recording.go index 388646c..828bb61 100644 --- a/ovenmedia/recording.go +++ b/ovenmedia/recording.go @@ -4,9 +4,9 @@ import "encoding/json" // -func (o *ovenMedia) StartRecording(url string, vHost string, appName string, body RequestRecordingStart) (*ResponseRecordingStart, error) { +func (o *ovenMedia) StartRecording(vHost string, appName string, body RequestRecordingStart) (*ResponseRecordingStart, error) { // - resp, err := o.post(url+GET_VHOSTS_START_RECORDED_BY_NAME(vHost, appName), body) + resp, err := o.post(GET_VHOSTS_START_RECORDED_BY_NAME(vHost, appName), body) if err != nil { return nil, err } @@ -21,9 +21,8 @@ func (o *ovenMedia) StartRecording(url string, vHost string, appName string, bod // -func (o *ovenMedia) StopRecording(url string, vHost string, appName string, body RequestRecordingStop) (*ResponseRecordingStart, error) { - // - resp, err := o.post(url+GET_VHOSTS_START_RECORDED_BY_NAME(vHost, appName), body) +func (o *ovenMedia) StopRecording(vHost string, appName string, body RequestRecordingStop) (*ResponseRecordingStart, error) { + resp, err := o.post(GET_VHOSTS_STOP_RECORDED_BY_NAME(vHost, appName), body) if err != nil { return nil, err }