Filter domain that can play the source in their iframe

168 views
Skip to first unread message

Brax Bruh

unread,
Aug 17, 2021, 9:03:47 AM8/17/21
to Ant Media Server

As the title says, how can I only allow specific domains to stream from my AMS in their players or iframe?

My setup is: Dedicated Server (AMS Origin) -> Good bandwidth VPS (AMS Pull) -> Dedicated Server (Our website LAMP | Player)

I would like to only allow two domains, one is the LAMP Server and two, a test domain where I test stuff before deploying.

I am reading about AMS Stream Security but I can't quite get my head around it. I'm very new to this, sorry.

Also, how can I limit viewers to only have 20 minutes of idle time before timing out?

TIA

Ant Media Support

unread,
Aug 17, 2021, 9:26:44 AM8/17/21
to staytr...@gmail.com, ant-medi...@googlegroups.com
Hi Jonnel Espiritu,
Hope you are doing well.
Also, you can refer the video for the same https://www.youtube.com/watch?v=74CB4Ji3CVw&t=2226s

Also, how can I limit viewers to only have 20 minutes of idle time before timing out? 
I'm not sure about exact solution for this, can you please let me know about your use case so that I can discuss  and help accordingly.

--
Best Regards,
Mohit Dubey
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


, Jonnel Espiritu <staytr...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/4f1ae923-b81e-4ae3-a2e3-00772e9f3283n%40googlegroups.com.
45883:1264838

Brax Bruh

unread,
Aug 17, 2021, 9:36:03 AM8/17/21
to Ant Media Server
I can't understand how to follow that guide and implement for my use-case. Is there anything I need to do within my Website Server?

My use-case is: Stream from my AMS Origin to VPS (Pull) and to my Website which plays the stream to my clients.

Ant Media Support

unread,
Aug 18, 2021, 5:54:45 AM8/18/21
to staytr...@gmail.com, ant-medi...@googlegroups.com
Hi Jonnel Espiritu,
I think to limit the publisher you can use https://github.com/ant-media/Ant-Media-Server/wiki/Stream-Security-Documentation#5-publisher-ip-filter and restrict access to only specific IPs to publish the stream,
for player I'm not yet aware of such case. Allow me some time and I'll discuss it with the developer and get back to you.
--
Best Regards,
Mohit Dubey


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.

On Tue, 17 Aug at 4:36 PM
, Jonnel Espiritu <staytr...@gmail.com> wrote:
I can't understand how to follow that guide and implement for my use-case. Is there anything I need to do within my Website Server?

My use-case is: Stream from my AMS Origin to VPS (Pull) and to my Website which plays the stream to my clients.

On Tuesday, August 17, 2021 at 9:26:44 PM UTC+8 support wrote:
Hi Jonnel Espiritu,
Hope you are doing well.
Also, you can refer the video for the same https://www.youtube.com/watch?v=74CB4Ji3CVw&t=2226s

Also, how can I limit viewers to only have 20 minutes of idle time before timing out? 
I'm not sure about exact solution for this, can you please let me know about your use case so that I can discuss  and help accordingly.

--
Best Regards,
Mohit Dubey
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Tue, 17 Aug at 4:03 PM
As the title says, how can I only allow specific domains to stream from my AMS in their players or iframe?

My setup is: Dedicated Server (AMS Origin) -> Good bandwidth VPS (AMS Pull) -> Dedicated Server (Our website LAMP | Player)

I would like to only allow two domains, one is the LAMP Server and two, a test domain where I test stuff before deploying.

I am reading about AMS Stream Security but I can't quite get my head around it. I'm very new to this, sorry.

Also, how can I limit viewers to only have 20 minutes of idle time before timing out?

TIA
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/4f1ae923-b81e-4ae3-a2e3-00772e9f3283n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.

Connessione

unread,
Aug 18, 2021, 8:37:25 AM8/18/21
to Ant Media Server
So you have a ams origin to push and a ams edge to pull and then want to render the stream on your web server pages.?

Publisher security will ensure that only specific IP can publish. Similarly you can use token security to ensure only subscribers with correct token can subscribe. I think what you are specifically looking for is domain locking.

Also, how can I limit viewers to only have 20 minutes of idle time before timing out? - What do you mean by idle time here ?

Brax Bruh

unread,
Aug 18, 2021, 9:09:34 AM8/18/21
to Ant Media Server
Hi, thank you for replying

" So you have a ams origin to push and a ams edge to pull and then want to render the stream on your web server pages.? " -- Yes

I just don't want the source to be exposed so that they cannot use my streams on their own websites.

" Also, how can I limit viewers to only have 20 minutes of idle time before timing out? - What do you mean by idle time here ?" -- For example, the stream have been on for a viewer, this viewer only has 20mins before the stream stops and he needs to refresh and resume the stream.

Connessione

unread,
Aug 18, 2021, 10:06:38 AM8/18/21
to Ant Media Server
Am not from the official support team but my general opinion would be :

1. You can do that via client side scripting 
2. You cans do that via server side custom scripting. 

I assume you are trying to make some kind of pay per view system ?

Brax Bruh

unread,
Aug 18, 2021, 10:28:03 AM8/18/21
to Ant Media Server
Same idea, yes. I just want that only viewers that are watching from my website can view it.

Ant Media Support

unread,
Aug 18, 2021, 10:39:19 AM8/18/21
to staytr...@gmail.com, ant-medi...@googlegroups.com
​In this you can define the time frame under which the user must start publish/play the stream otherwise the token will expire after the allotted time.
But I think you want a solution in which the stream expires after 20 minutes and not the token?


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.

, Jonnel Espiritu <staytr...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.

Ant Media Support

unread,
Aug 18, 2021, 10:44:59 AM8/18/21
to staytr...@gmail.com, ant-medi...@googlegroups.com
Hi Jonnel Espiritu,
Also, for limiting the player it is like you want only your server to play the stream and not any other IP/server. For this case you can use any security method like One time token https://github.com/ant-media/Ant-Media-Server/wiki/Stream-Security-Documentation#2-one-time-token-control
so that the stream can be played only once with a particular token and if someone tries to play the stream again it won't play as the one time token has already expired. 


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.

On Wed, 18 Aug at 5:39 PM
, Ant Media Support <sup...@antmedia.io> wrote:
​In this you can define the time frame under which the user must start publish/play the stream otherwise the token will expire after the allotted time.
But I think you want a solution in which the stream expires after 20 minutes and not the token?


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 18 Aug at 5:28 PM
, Jonnel Espiritu <staytr...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/4b26bebc-99ff-4f3c-94fa-32a1287a2ec5n%40googlegroups.com.
45883:1264838
Reply all
Reply to author
Forward
0 new messages