Jump to content
  • 0

Live viewer count - DJ Streams


Jamie C1648581710
 Share

Question

Hey all,

I am looking into trying AMS for a live DJ streaming platform.

For this, I want the viewers to see the live viewers count.
I was thinking of using the embedded web player.

I can see from other posts here:

that an IFrame from the web player would be good

<iframe width="560" height="315" src="https://your_domain_name:5443/LiveApp/play.html?name=125214322064017559554903" frameborder="0" allowfullscreen></iframe>

I can see from the rest API that : /v2/broadcasts/active-live-stream-count
is probably what I am looking for

I know that the local IP 127.0.0.1 could call this but I want all my users from the iframe to be able to see this.

So how can I go about getting this working?

If I allow All IPs to do API calls they could just do something nasty to my server?
Could I edit the player.html to display this out to all users from the server directly ?

Can the active-live-stream-count just be added to the iframe and be displayed to all users without having to allow all IPs ?

Not sure what is the best approach is

Please help!

J

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

>From design standpoint it is better to wrap the actual api inside another outer api layer such as Amazon api gateway or your custom wrapper and expose only certain specific calls to public. The wrapper will use authentication to talk to actual API. This makes your system safe and secure. You can also use this wrapper system to create roles for finer access control to the actual API.

Regards 

 

Link to comment
Share on other sites

  • 0

I believe you should be able to implement the architecture on any platform. I am not very familiar with gcp api management though. I can explain the theory to you.

Say I have 2 apis and both are accessible via authentication. I want to use just one for public website..

 So what you do is create a public api endpoint for the one you want to expose. It is open and has no passwords. Now when you hit that api endpoint , it should use a function (server side / cloud function like lambda) to invoke the private api with authentication parameters as needed, the author details are provided in the function. The response is is fetched from the private api and returned to original caller of the public endpoint. (End to end fetch). So the user of the public api does not need to know auth details or where the data comes from.

If your original api and public api service is on same server then it’s even better but otherwise your private api will need to be accessible to the public endpoint service through a public host or something. If they are on same server then it cans just access via localhost.

Hope that gives some clarity on the subject.

Regards 

 

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...