ImediaseeUvaultCDNInfluxis
FlashComGuru
 
 

  Active Topics    Memberlist    Search    Help
  Register  Login
Code snippets
 Flashcomguru Forums | Code snippets
Subject Topic: Redirect connection Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jose.navarro
Flashcom Newbie
Flashcom Newbie


Joined: 15 July 2009
Location: Spain
Posts: 3
Posted: 15 July 2009 at 13:03 | IP Logged Quote jose.navarro

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 View jose.navarro's Profile Search for other posts by jose.navarro
 
brian500
Flashcom Newbie
Flashcom Newbie


Joined: 01 April 2010
Posts: 1
Posted: 01 April 2010 at 13:13 | IP Logged Quote brian500

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 View brian500's Profile Search for other posts by brian500
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.6
Copyright ©2001-2003 Web Wiz Guide


   all contents © Flashcomguru.com - Flash® is a trademark of Adobe® 1995-2007