Jump to content
  • 0

Webhook url endpoint: RTMP or WebRTC?


Lluis Semper
 Share

Question

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

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...