ant-media/Ant-Media-Server

Create a stream start time field for the streams/broadcasts

mekya opened this issue · 4 comments

mekya commented
  • Create a new field in Broadcast object with name startTime
  • Update the startTime with unix timestamp when stream is started.
  • It should work both RTMP, WebRTC Ingest and Stream Sources
  • Implement simple unit tests for RTMP, WebRTC Ingest and Stream Sources

@mekya has this been impliemented?
We are moving from https://www.npmjs.com/package/webrtc-adapter to Ant media WebRTCAdaptor and having issues calculating the watch time for clients

webrtc-adapter returned: statTime, lastTime which allowed us to calculate the watch time.

How can we calculate watch time using WebRTCAdaptor?

mekya commented

Hi @samidalati
Sorry I've missed responding your message.

Yes, it's implemented.

AFA I understand, your requirement is different. You want to have the watch time of every viewer?

Hi @mekya .

I have also with above issue : how I can count times about the watch time of every viewer?

Hi @nhuttvNexle,
You can provide subscriberId for the viewers while starting playback. Then you can use the following REST method to get stats.

curl -X 'GET' 'http://IP-address-or-domain:5080/Application_Name/rest/v2/broadcasts/streamId/subscriber-stats/list/0/10' -H 'accept: application/json'