- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
yes i forget this , i search more but your source have a bug
, i don(t have sound .with this code :
<mx:VBox width="40%" height="100%" right="0">
<mx:Button label="Déconnexion" click="logout()" />
<!-- scroll bar pourle volume -->
<mx:VBox paddingLeft="15" width="10%">
<mx:Label text="Gain" fontWeight="bold" />
<mx:HSlider id="gainSlider" minimum="0" maximum="100"
width="90%" value="{audio.gain}" labels="[0,50,100]"
change="onGainChange(event)" />
</mx:VBox>
<mx:VBox paddingLeft="15" fontWeight="bold"
width="70%">
<mx:Label text="UseEchoSuppression"/>
<mx:RadioButtonGroup id="echoGroup"
itemClick="onItemClick(event)" />
<mx:RadioButton label="Yes"
selected="{audio.useEchoSuppression}" groupName="echoGroup" />
<mx:RadioButton label="No"
selected="{!audio.useEchoSuppression}" groupName="echoGroup"/>
</mx:VBox>
<!--<mx:VBox paddingLeft="15" fontWeight="bold"
width="70%">
<mx:Label text="Microphone Volume"/>
<mx:ProgressBar id="activityProgress" minimum="0"
maximum="100" mode="manual" label="" />
</mx:VBox> -->
<rtc:AudioPublisher id="audio" height="0" />
<rtc:AudioSubscriber/>
<mx:HBox width="100%" horizontalAlign="center">
<mx:Button id="btn" label="Start My Audio"
click="onAudioClick(event)" toggle="true" />
</mx:HBox>
<mx:Button label="AudioButt"
toggle="true" id="audioButt" color="#000000"
click="(audioButt.selected) ? audio.publish() :
audio.stop()"/>
/**
* When a click starts the audio, it publishes the audio
through AudioPublisher.
* Another click stops the audio.
*/
private function onAudioClick(p_evt:MouseEvent):void
{
if ( p_evt.currentTarget.label == "Start My Audio" ) {
audio.publish();
p_evt.currentTarget.label = "Stop My Audio" ;
}else if (p_evt.currentTarget.label == "Stop My Audio" ){
audio.stop();
p_evt.currentTarget.label = "Start My Audio" ;
}
}
/**
* Changes the gain by changing the gain slider value.
*/
private function onGainChange(event:Event):void
{
audio.gain = gainSlider.value ;
}
/**
* * Controls echo suppression through the use of radio
buttons.
*/
private function onItemClick(p_evt:ItemClickEvent):void
{
if ( p_evt.currentTarget.selectedValue == "Yes" ) {
audio.useEchoSuppression = true ;
}else if ( p_evt.currentTarget.selectedValue == "No" ) {
audio.useEchoSuppression = false ;
}
}
, i don(t have sound .with this code :
<mx:VBox width="40%" height="100%" right="0">
<mx:Button label="Déconnexion" click="logout()" />
<!-- scroll bar pourle volume -->
<mx:VBox paddingLeft="15" width="10%">
<mx:Label text="Gain" fontWeight="bold" />
<mx:HSlider id="gainSlider" minimum="0" maximum="100"
width="90%" value="{audio.gain}" labels="[0,50,100]"
change="onGainChange(event)" />
</mx:VBox>
<mx:VBox paddingLeft="15" fontWeight="bold"
width="70%">
<mx:Label text="UseEchoSuppression"/>
<mx:RadioButtonGroup id="echoGroup"
itemClick="onItemClick(event)" />
<mx:RadioButton label="Yes"
selected="{audio.useEchoSuppression}" groupName="echoGroup" />
<mx:RadioButton label="No"
selected="{!audio.useEchoSuppression}" groupName="echoGroup"/>
</mx:VBox>
<!--<mx:VBox paddingLeft="15" fontWeight="bold"
width="70%">
<mx:Label text="Microphone Volume"/>
<mx:ProgressBar id="activityProgress" minimum="0"
maximum="100" mode="manual" label="" />
</mx:VBox> -->
<rtc:AudioPublisher id="audio" height="0" />
<rtc:AudioSubscriber/>
<mx:HBox width="100%" horizontalAlign="center">
<mx:Button id="btn" label="Start My Audio"
click="onAudioClick(event)" toggle="true" />
</mx:HBox>
<mx:Button label="AudioButt"
toggle="true" id="audioButt" color="#000000"
click="(audioButt.selected) ? audio.publish() :
audio.stop()"/>
/**
* When a click starts the audio, it publishes the audio
through AudioPublisher.
* Another click stops the audio.
*/
private function onAudioClick(p_evt:MouseEvent):void
{
if ( p_evt.currentTarget.label == "Start My Audio" ) {
audio.publish();
p_evt.currentTarget.label = "Stop My Audio" ;
}else if (p_evt.currentTarget.label == "Stop My Audio" ){
audio.stop();
p_evt.currentTarget.label = "Start My Audio" ;
}
}
/**
* Changes the gain by changing the gain slider value.
*/
private function onGainChange(event:Event):void
{
audio.gain = gainSlider.value ;
}
/**
* * Controls echo suppression through the use of radio
buttons.
*/
private function onItemClick(p_evt:ItemClickEvent):void
{
if ( p_evt.currentTarget.selectedValue == "Yes" ) {
audio.useEchoSuppression = true ;
}else if ( p_evt.currentTarget.selectedValue == "No" ) {
audio.useEchoSuppression = false ;
}
}
Views
Replies
0 Likes
Total Likes