| Author |
|
jose.navarro Flashcom Newbie

Joined: 15 July 2009 Location: Spain Posts: 3
|
| Posted: 15 July 2009 at 13:03 | IP Logged
|
|
|
Hi everybody!
I am trying to write a GEOIP lock module. I am using the access plugin and a MaxMind DB.
When an user is not authorized to access, I would like to redirect his connection to show a flash message (video).
The access plugin has 3 methods: accept, reject and redirect
However, the redirect method does not work as I expected.
Can anyone help me? Thank you very much!!!!
Code:
...
...
switch( pAccess->getType() )
{
case IFCAccess::CONNECT:
{
if (!allowtest(pAccess->getValue("c-ip"))) //Allow access?
{
//Not Allow: User should be redirected
pAccess->redirect("rtmp://IP_Server/vod/notallow.flv", "No tiene acceso a este contenido");
}
else
{
//Allow: user can wath the content
pAccess->accept();
}
break;
}
default:
// We really shouldn't get here!
fprintf( stderr, "SampleAdaptor: Evento de acceso desconocido!\n" );
}
...
...
With this code, authorized users can watch the content, and unauthorized users are not showed anything!!!
Best regards,
Jose
|
| Back to Top |
|
| |
brian500 Flashcom Newbie

Joined: 01 April 2010 Posts: 1
|
| Posted: 01 April 2010 at 13:13 | IP Logged
|
|
|
Nice work! It looks that you are highly expert blogger. Your post is an excellent example of why I keep coming back to read your excellent quality content that is forever updated.
Hi
I'd like to add to this thread - we've also been
disappointed with the live streaming capabilities of FMS.
we're still convinced that the media server should be
capable of handling the live streams (the vod demo shows
that if the source if high-quality then fms can handle
it) but in practice we are not getting the results we
were hoping for :(
ok, maybe it was a bit much to expect the flash player,
sitting inside a browser window, to encode at better-
than-webcam bitrates/framerates but we didn't expect to
find such a bottleneck in this first step in the
pipeline.
sorry not to be able to offer you a solution jim100, this
is one of those "we have this problem too!" replies :(
anyone else had more success?
if we find something better than media live encoder i'll
post back
__________________ This site is very helpful for me and others
|
| Back to Top |
|
| |
|
|