ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.23k stars 618 forks source link

Messages sent to data channel via REST API are delivered twice #6320

Open petarb1988 opened 4 months ago

petarb1988 commented 4 months ago

Short description

When using the REST API to send a message to the stream's data channel, the message is delivered twice. NOTE: the data channel setting is that messages are distributed to the publisher and all players.

Environment

Steps to reproduce

  1. Send a message to REST API (https://{antmediaserver.base.url}/v2/broadcasts/{streamId}/data)

Expected behavior

The message should be received once.

Actual behavior

The message is received twice by the viewer/callback URL (this part is incorrect), and once by the streamer (this part is correct).

burak-58 commented 4 months ago

Hi @petarb1988, Thanks for reporting the issue. I need to understand scenario better. Can you tell me how I can reproduce it with sample pages? Are you using WebRTC publish and play pages or conference page? Where and how you call data REST method?

petarb1988 commented 4 months ago

We're using mobile only so far but I have tested the issue with the Play page on an active stream and a test message sent through the REST data channel API - https://{antmediaserver.base.url}/WebRTCAppEE/rest/v2/broadcasts/{streamId}/data (the link in the original post is wrong, my mistake) - also is printed twice in the data channel messages.

So set up a working stream, access it through the Play page, click Options so the data channel messages box opens and send a message using the API URL I mentioned above. It should print once in the messages box but it prints twice.

mekya commented 2 months ago

Hi @petarb1988,

It's a known issue. I've put it in the backlog.

Please reach out to contact@antmedia.io if this issue is urgent for you.

Cheers Oz