Lluis Semper Posted April 26, 2021 Share Posted April 26, 2021 After sending signal to ant-server my webhook endpoint it is called. I would like to konw if there is a way to know if that signal comes from OBS or WebRTC I am looking at the 'liveStreamStarted event and get the data of the broadcast. The data that I get in the endpoint is as follows: ``` antWebHook -> response { [0] streamId: 'live_36fb938ba6691axsc5084d02f913ba_event_ac61d2aeb4d2a223d243a05c59958320a72c', [0] status: 'broadcasting', [0] type: 'liveStream', [0] name: null, [0] description: null, [0] publish: true, [0] date: 1619453280502, [0] plannedStartDate: 0, [0] plannedEndDate: 0, [0] duration: 0, [0] endPointList: null, [0] publicStream: true, [0] is360: false, [0] listenerHookURL: 'https://webhook.eu.ngrok.io/webhook', [0] category: null, [0] ipAddr: null, [0] username: null, [0] password: null, [0] quality: null, [0] speed: 2.240740740740741, [0] streamUrl: null, [0] originAdress: 'xx.x.x.xx', [0] mp4Enabled: 1, [0] webMEnabled: 0, [0] expireDurationMS: 0, [0] rtmpURL: 'rtmp://xx.x.x.xx/<app>/live_36fb938ba669asdd0c5084d02f913ba_ac61d2aeb4d2a223d243a05c59958320a72c', [0] zombi: true, [0] pendingPacketSize: 1, [0] hlsViewerCount: 0, [0] webRTCViewerCount: 0, [0] rtmpViewerCount: 0, [0] startTime: 1619453280502, [0] receivedBytes: 0, [0] bitrate: 0, [0] userAgent: 'N/A', [0] latitude: null, [0] longitude: null, [0] altitude: null, [0] mainTrackStreamId: null, [0] subTrackStreamIds: null, [0] absoluteStartTimeMs: 0, [0] webRTCViewerLimit: -1, [0] hlsViewerLimit: -1 [0] } Currently I keep pooling the data for a few seconds to see if the speend increases, if it does I assume it is rtmp. I do not see it as an ideal solution. Any pointers? Link to comment Share on other sites More sharing options...
0 Selim Emre Posted April 27, 2021 Share Posted April 27, 2021 Hi Lluis, Have a good day. Currently, there is no publish type in broadcast object. But I have a workaround for you. You can understand publish type with broadcast speed parameter. When you are using RTMP, speed will change. If you are sending your stream with WebRTC, speed will not change. It will constant 0 in WebRTC Stream. Btw, this parameter can be good in the broadcast object. Could you please add this feature request to issue tracking system -> https://github.com/ant-media/Ant-Media-Server/issues I hope, I could help you. Best Regards, Selim Link to comment Share on other sites More sharing options...
0 Lluis Semper Posted April 27, 2021 Author Share Posted April 27, 2021 Hi Selim, Thank you very much for your answer! I will add this feature request. Best Lluis Link to comment Share on other sites More sharing options...
0 Connessione Posted April 29, 2021 Share Posted April 29, 2021 Have you tried to check details fo the connection object associated with the stream object? Link to comment Share on other sites More sharing options...
Question
Lluis Semper
After sending signal to ant-server my webhook endpoint it is called.
I would like to konw if there is a way to know if that signal comes from OBS or WebRTC
I am looking at the 'liveStreamStarted event and get the data of the broadcast.
The data that I get in the endpoint is as follows:
```
Currently I keep pooling the data for a few seconds to see if the speend increases, if it does I assume it is rtmp. I do not see it as an ideal solution. Any pointers?
Link to comment
Share on other sites
Top Posters For This Question
2
1
1
Popular Days
Apr 27
2
Apr 26
1
Apr 29
1
Top Posters For This Question
Lluis Semper 2 posts
Selim Emre 1 post
Connessione 1 post
Popular Days
Apr 27 2021
2 posts
Apr 26 2021
1 post
Apr 29 2021
1 post
3 answers to this question
Recommended Posts