ImediaseeUvaultCDNInfluxis
FlashComGuru
 
 

  Active Topics    Memberlist    Search    Help
  Register  Login
General Flashcom / Flash Media Server
 Flashcomguru Forums | General Flashcom / Flash Media Server
Subject Topic: mic permission Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 21 July 2005 at 19:02 | IP Logged Quote guestfun

how do i set user mic permission? if i want only that people use mic,other cant use mic vice versa.
thank you!
Back to Top View guestfun's Profile Search for other posts by guestfun
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 10 August 2005 at 06:12 | IP Logged Quote guestfun

hi,Is it possible that if a user speak then other people cant get the mic.?

__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 11 August 2005 at 07:31 | IP Logged Quote Djanoux

you can do with write mic status on SO. For ex: "SO.micEnabled"
whenever someone used mic, set SO.micEnabled = false or true.
And SO.micEnabled arleady set now you can detect if someone already used mic or not.

here the code

Code:

var micEnabled = true;
var nc = new NetConnection();
nc.onStatus = function(info){
     trace(info.code);
}
nc.connect("rtmp:/sample_lobby");

mic_so = SharedObject.getRemote("mic_so", nc.uri, false);
mic_so.onSync = function(list){
     micEnabled = mic_so.data.micStatus;
     trace("mic status : "+micEnabled);
}
mic_so.connect(nc);


startTalk = function(){
     if(!micEnabled) {
           trace("mic is in used!");
           // you code here
           return;
     } else {
           mic_so.data.micStatus = false;
           // you code here
     }
}
stopTalk = function(){
     mic_so.data.micStatus = true;
     // you code here
}


__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 11 August 2005 at 08:24 | IP Logged Quote guestfun

thank you!
Can you explain in detail?

__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 11 August 2005 at 08:53 | IP Logged Quote Djanoux

are u using audio component?

__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 11 August 2005 at 09:06 | IP Logged Quote guestfun

Actually yes,but i edited it a bit.

__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 11 August 2005 at 10:11 | IP Logged Quote guestfun

Alright,i think another method thats if admins login then the audio buttons will appear in each avpresence,so if admins want the unique person talk,then admin permits the audio button like a tick in those unique person.

The question i'd like to know how do i place audio component in each avpresence instead of audio component functions for each person.

maybe it is complicated,anyway,hope to communicate with it.

Edited by guestfun on 11 August 2005 at 10:13


__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 11 August 2005 at 13:56 | IP Logged Quote guestfun

any idea ?

__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 12 August 2005 at 02:18 | IP Logged Quote Djanoux

For that way I suggest you to build your own component.
better AS also easier for manage / editing

__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
guestfun
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 21 July 2005
Location: Hong Kong
Posts: 32
Posted: 12 August 2005 at 03:31 | IP Logged Quote guestfun

i solved it,thank you!

__________________
FUN
Back to Top View guestfun's Profile Search for other posts by guestfun
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 12 August 2005 at 04:11 | IP Logged Quote Djanoux

Okay about audio component editing here they are:

on line 17 you will found:
Code:

FCAudioConferenceClass.prototype.init = function() {
     this.name = (this._name == null ? "_DEFAULT_" : this._name);
     this.prefix = "FCAudioConference." + this.name + ".";
};

You must edit to:
Code:

FCAudioConferenceClass.prototype.init = function() {
     this.name = (this._name == null ? "_DEFAULT_" : this._name);
     this.prefix = "FCAudioConference." + this.name + ".";
     this.micEnabled = true;
};


on line 27
Code:

     this.so.onSync = function(list) {
                for (var i = 0; i < list.length; i++) {
.............

change into:
Code:

this.so.onSync = function(list) {
                for (var i = 0; i < list.length; i++) {
                      if(list[i].name == "micStatus"){
                                this.owner.micEnabled = this.data.micStatus.enabled;
                                trace("mic status : "+this.data.micStatus.enabled);
                                trace("mic used by : "+this.data.micStatus.usedBy);
                      } ; else if ((list[i].name.substr(0, 1) == "u" && this.data[list[i].name][0] != null) || list[i].code == "delete") {
                                this.owner.audio_lb.remo veAll();
                                this.total = 0;
                             for (var n in this.data) {
                                     this.total ++;
                                      if(this.data [n][0].length > 0){
                                             this.owner.audio_lb.addItem(this.data [n][0], this.data[n][1] == true ? "on" : "off");
                                     }
                               }
..........


Line 126
Code:
FCAudioConferenceClass.prototype.pttPress = function() {
     this.talking = true;
        this.streamOut_ns. attach Audio( this.local_mic);
     if (!this.auto) {
                this.so.data [this.userID][1] = true;
                this.localAudio_mc.light_mc.gotoAndS top(2);
       }
};

to:
Code:
FCAudioConferenceClass.prototype.pttPress = function() {
     
     if(!this.micEnabled) {
                trace("mic is used by "+this.so.data.micStatus.usedBy);
                return;
      }
     this.so.data.micStatus = {usedBy:this.userID,enabled:false};
     
     this.talking = true;
        this.streamOut_ns. attach Audio( this.local_mic);
     
     if (!this.auto) {
                this.so.data [this.userID][1] = true;
                this.localAudio_mc.light_mc.gotoAndS top(2);
       }
};


Line 135
Code:

FCAudioConferenceClass.prototype.pttRelease = function() {
     if (!this.auto) {
                this.talking = false;
               this.streamOut_ns. attach Audio(null);
                  this.so.data[this.userID][1] = false;
                this.localAudio_mc.light_mc.gotoAndStop(1);
       }
};

to:
Code:
FCAudioConferenceClass.prototype.pttRelease = function() {
     if (!this.auto) {
               
                this.talking = false;
               this.streamOut_ns. attach Audio(null);

                if(!this.micEnabled and this.so.data.micStatus.usedBy == this.userID){
                      this.so.data .micStatus = {usedBy:null,enabled:true};
                }
               
                this.so.data [this.userID][1] = false;
                this.localAudio_mc.light_mc.gotoAndStop(1);
       }
};


Well still I recommanded you to build your own component :)

Edited by Djanoux on 12 August 2005 at 04:15


__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
annaseria
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 01 June 2005
Location: Italy
Posts: 8
Posted: 07 September 2005 at 06:52 | IP Logged Quote annaseria

Djanoux
can you contact me in msn messanger i need your help please
annaseria@hotmail.com
Back to Top View annaseria's Profile Search for other posts by annaseria Visit annaseria's Homepage
 
annaseria
Flashcom Newbie
Flashcom Newbie
Avatar

Joined: 01 June 2005
Location: Italy
Posts: 8
Posted: 07 September 2005 at 19:02 | IP Logged Quote annaseria

djanoux where are you?
Back to Top View annaseria's Profile Search for other posts by annaseria Visit annaseria's Homepage
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 09 September 2005 at 06:03 | IP Logged Quote Djanoux

guestfun wrote:
i solved it,thank you!


Here the sample: http://janumedia.blogspot.com/2005/08/flashcomm-audio-compon ent-_112546517324830449.html
Also with the source!

__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 
Djanoux
Flashcom Middleweight
Flashcom Middleweight
Avatar

Joined: 29 March 2004
Location: Indonesia
Posts: 94
Posted: 09 September 2005 at 06:04 | IP Logged Quote Djanoux

annaseria wrote:
djanoux where are you?


Hi whats up

__________________
an Indonesian Flash Interactive Media Developer
my blog: http://janumedia.com/blog
Back to Top View Djanoux's Profile Search for other posts by Djanoux Visit Djanoux's Homepage
 

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