Jump to content
  • 0

Associate application user ID with stream ID


Hermawan Winata
 Share

Question

Hi, I'm building a conference call application using AntMedia WebRTC, but I find it difficult to associate stream ID with my application user ID. Do you have suggestions how it can be achieved?
I'm thinking of below approaches:



  1. Using WebRTC data channel. Is it already supported in AntMedia server?
  2. Modifying SDP parameter `s={userID}` or `i={userID}` based on https://tools.ietf.org/html/rfc4566. Will AntMedia server preserves that data in the offer and answer SDP from clients during 'publish' and 'play' flow?

Any inputs are appreciated.


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 Hermawan,

You can use a token based approach where you can assign a token to each user and let them use that token to publish or play. 
https://antmedia.io/secure-streaming-with-hash-based-tokens/

Data channels are supported in AntMedia Server but I'm not sure how it can be used for this use case.

Best,
Asim


On Thursday, May 21, 2020 at 6:56:43 PM UTC+3, Hermawan Winata wrote:
Hi, I'm building a conference call application using AntMedia WebRTC, but I find it difficult to associate stream ID with my application user ID. Do you have suggestions how it can be achieved?
I'm thinking of below approaches:
  1. Using WebRTC data channel. Is it already supported in AntMedia server?
  2. Modifying SDP parameter `s={userID}` or `i={userID}` based on https://tools.ietf.org/html/rfc4566. Will AntMedia server preserves that data in the offer and answer SDP from clients during 'publish' and 'play' flow?
Any inputs are appreciated.
Link to comment
Share on other sites

  • 0
Hi Asim,

Thank you for your reply.

Based on that link, we can calculate token from
STREAM_ID: The id of stream, generated in Ant Media Server.
ROLE: “play” or "publish"
SECRET: Shared secret key (should be defined in the setting file)

Afterwards, that token should be sent to my application server in order to associate userID and streamID. 
But instead of token, I can also send streamID directly. Is my understanding correct?

What I have in mind is something like display_name in AntMedia WebSocket protocol
{
    command : "joinRoom",
    room : "room1",
    display_name: userIdOrUsername
}
Is it supported?

Best regards,
Hermawan.


On Saturday, May 23, 2020 at 7:41:18 AM UTC+9, mahmut asım Onat wrote:
Hi Hermawan,

You can use a token based approach where you can assign a token to each user and let them use that token to publish or play. 
https://antmedia.io/secure-streaming-with-hash-based-tokens/

Data channels are supported in AntMedia Server but I'm not sure how it can be used for this use case.

Best,
Asim


On Thursday, May 21, 2020 at 6:56:43 PM UTC+3, Hermawan Winata wrote:
Hi, I'm building a conference call application using AntMedia WebRTC, but I find it difficult to associate stream ID with my application user ID. Do you have suggestions how it can be achieved?
I'm thinking of below approaches:
  1. Using WebRTC data channel. Is it already supported in AntMedia server?
  2. Modifying SDP parameter `s={userID}` or `i={userID}` based on https://tools.ietf.org/html/rfc4566. Will AntMedia server preserves that data in the offer and answer SDP from clients during 'publish' and 'play' flow?
Any inputs are appreciated.
Link to comment
Share on other sites

  • 0
Hi Hermawan,

Sorry for the late reply, you can think of the streamID as a property of the room and people joining has no such property. There is no real way to distinguish two users if you don't use an additional method. You can use a token based approach or maybe use session token in your website. Apart from that we don't have diplay_name or a similar function.

Best,
Asim

On Monday, May 25, 2020 at 7:09:56 PM UTC+3, Hermawan Winata wrote:
Hi Asim,

Thank you for your reply.

Based on that link, we can calculate token from
STREAM_ID: The id of stream, generated in Ant Media Server.
ROLE: “play” or "publish"
SECRET: Shared secret key (should be defined in the setting file)

Afterwards, that token should be sent to my application server in order to associate userID and streamID. 
But instead of token, I can also send streamID directly. Is my understanding correct?

What I have in mind is something like display_name in AntMedia WebSocket protocol
{
    command : "joinRoom",
    room : "room1",
    display_name: userIdOrUsername
}
Is it supported?

Best regards,
Hermawan.


On Saturday, May 23, 2020 at 7:41:18 AM UTC+9, mahmut asım Onat wrote:
Hi Hermawan,

You can use a token based approach where you can assign a token to each user and let them use that token to publish or play. 
https://antmedia.io/secure-streaming-with-hash-based-tokens/

Data channels are supported in AntMedia Server but I'm not sure how it can be used for this use case.

Best,
Asim


On Thursday, May 21, 2020 at 6:56:43 PM UTC+3, Hermawan Winata wrote:
Hi, I'm building a conference call application using AntMedia WebRTC, but I find it difficult to associate stream ID with my application user ID. Do you have suggestions how it can be achieved?
I'm thinking of below approaches:
  1. Using WebRTC data channel. Is it already supported in AntMedia server?
  2. Modifying SDP parameter `s={userID}` or `i={userID}` based on https://tools.ietf.org/html/rfc4566. Will AntMedia server preserves that data in the offer and answer SDP from clients during 'publish' and 'play' flow?
Any inputs are appreciated.
Link to comment
Share on other sites

 Share

×
×
  • Create New...