Flash :: Videochat Netstream SoundTransform Not Working For Volume Control?
Jan 3, 2012
I have a video chat application where there can be 6 participants. What I would like to do is give the option to each publisher to control their own stream's volume. The code I have looks like this.
[global]
private var volumeTransform:SoundTransform;
[In the init method where ]
outgoingStream = new NetStream( nc );
[Code]....
A possible solution can be this : Calibrate the slider and set the microphone gain, a gain of zero effectively is mute and a gain of 100 is full volume.
View 1 Replies
Similar Posts:
Jun 22, 2009
I have this code, and it works perfectly fine for the most part:
soundTrans.volume = 0.1
What this does, it plays the Sound at about 10% of its total volume.But about 1 out of 10 times, there seems to be a bug, that causes it to play 100% of its volume for like a split second then it goes down to the 10%.Like if the soundTransform is applied after the sound has already started playing, and the Player just sometimes cant synchronize it perfectly? I tried to play around with trying to set the soundTrans BEFORE starting the channel, like:
soundChannel.SoundTransform = soundTrans;
but to no effect, it seems the player Applies the soundTransform always just when the Sound starts playing.(or actually just a bit after)This is especially annoying if you are trying to Fade in a music slowly maybe over the course of 5 seconds, and then it starts with a big BANG, and then it goes down, then it fades in, ruining the whole effect.
View 1 Replies
Feb 2, 2012
Trying to reduce frame overhead in my game, im trying to figure out how to speed it up.These are some 'simple' questions if you know your way around sounds and channels so i'm hoping you'll read on and perhaps give me some insights.
I'm noticing that playing soundclips sometimes make it stutter so im looking for the best way to use sounds and channels.The main question is below: how costly is a soundtranform.volume and is it persistent on a channel?secondairy; does it matter howmany soundclips i drop into the same channel?What i noticed: The channel.soundtransform.volume only works after playing the sound. Q: How costly is a channel.soundtransform.volume?&; Will it stay this volume on the next sound that plays? or do i have to reset it each time?
Also: playing a lot of sounds in 1 channel isnt a good idea.So i created a channel for each gameobject that could produce sound.On each sound play i calculate distance from main player and set volume accordingly.
1: I could just pre create like 10 channels set the volume from 0.1 to 1.0 accordingly then play each sound in the specific range channel This way i wouldnt have to do soundtransforms on the fly.If however every sound producing object would be at the same distance it would clutter 1 channel with a lot of clips to play at the same time.
2: I could pre create 10 channels as a queue. On every play i would pick the next free channel, looping & wrapping through them as i go.
Here however i will have to set the soundtransform volume again on each play according to distance.
View 5 Replies
Nov 3, 2009
I am trying to write a very simple mp3 player with a volume control slider. My trace statements show that the value of the mp3 volume changes when the slider is moved but the actual volume does not change. I have attached my fla and here is my code:
ActionScript Code:
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
[Code]...
View 1 Replies
Sep 6, 2011
i'm trying to play a sound from left to right using actionscript3. i have putted in the first keyframe the code. what i have wrote is:
Code:
var soundClip:Sound;
var channel:SoundChannel = new SoundChannel();
var trans:SoundTransform = new SoundTransform();
[Code]...
View 1 Replies
Nov 25, 2011
I want to get the activity level of audio of a NetStream, similar to how you can do it with a Microphone.In this article,
[Code]...
View 2 Replies
Oct 29, 2009
I got a code for a flash player but it only has a start and stop button . I would like to know how to add a volume control and a pause button.
Here is the code;
var nc:NetConnection = null;
var nsPlay:NetStream = null;
var metaDataValues:Array = new Array();
[Code].....
View 2 Replies
Jun 13, 2007
I would like to ask, how can I adjust the volume for the video playback ? here is the code
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
video.attachNetStream(ns);
[Code]...
View 7 Replies
Nov 10, 2009
Flash has an API to control the volume for a Sound object. Can volume be controlled like this currently or is there support planned for <audio> or <video> html5 elements?
View 2 Replies
Nov 28, 2008
Is it possible for flash to access the windows xp system volume controls?I assume flash can't by it's self, but can flash be used to trigger a function in another language that can access and alter the system volume? At least detect if the audio is muted on the system and give the option to turn it on.The flash movie would be embedded in a browser. The content of the movie has audio that is required. We want the user to be able to control the system volume from within the flash movie.
View 0 Replies
Feb 17, 2011
This is the code am using to create a mp3 player,everything is fine but the volume controls,not able to mute or increase the volume,kindly tell whats wrong in the code
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
[Code]....
View 1 Replies
Mar 11, 2011
I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player starts playing the video from the beginning). Anyone knows what might be the problem? (I am using Netstream for this instead of adding a parameter with the starting time when I call the Netstream.play method because I don't have Flash Media Server).
View 2 Replies
Aug 24, 2009
I would like to build a video conferencing app that supports H.264. Is there a way to use Flash to do that? I understand that Flash natively supports the Sorensen Spark video codec and that you need to use Flash Live Encoder 3 for H.264 encoding. I can't seem to find any documentation that shows me how to use FLE3 with ActionScript.
View 3 Replies
Aug 26, 2010
Let me preface this by saying: This is definitely a bug either with latest Adobe Flash Player or the streaming Media Server (in this case Real Helix):In the latest version of the Flash player (10.1.82.76) Code that worked previously in version 10.1.53.64 does not work now. This is basic code to connect to an RTMP server (Real Helix) using Netstream class. NOW the video does not even display and there is no error message . THIS ONLY OCCURS in a BROWSER . Also I am using swfobject to display the flash and I tried with latest version and the old 1.4.1 version.
private function init():void video = new Video(); NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0; nc = new NetConnection(); nc.client = this;
[code].....
View 2 Replies
Jan 13, 2009
using action script2 flash cs3, and i need more than one volume slider/control and each control needs to be assigned to one sound, atm i have more than one volume slider but they all control the same sound!
View 1 Replies
Mar 20, 2012
I was wondering if there was a way to get the sound from a FLVPlayback component and manipulate it with using a custom volume slider? Within my Actionscript I currently have this code which enables me to control the volume of a MP3:
import fl.events.SliderEvent;
var mysong = new music();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
myChannel = mysong.play(0,10);
[Code]...
But Instead of using the MP3 for sound, is there a way to use an FLV's sound instead?
View 1 Replies
May 22, 2009
I have an application with a collection of sounds in the timeline. One sound file is recorded at a slightly lower volume than the others. I know I could change this in Audacity but I'm wondering whether I could attach a line of actionscript to its button to raise its volume slightly.I know its possible to do this when playing sounds with actionscript directly from the library, but that would be too big a departure from the development style used.
View 1 Replies
Dec 23, 2008
If I have library song playing using a simple code like: var mySong:Song = new Song();mySong.play(); How do I use a button to control its volume so that each time it is clicked the volume goes up or down by a little.
View 14 Replies
May 4, 2009
Is there a way to configure/control the volume level of an mp3 that automatically plays in your flash segment? In other words I'd like for the volume to play at a 30 or 50% level.
View 6 Replies
Jun 14, 2010
I was wondering if there is a way to control the volume of a movieclip directly without using the sound class?
Or is there a way to control the volume of the entire swf?
View 2 Replies
May 9, 2011
How to make the slider component into a volume control in ActionScript 3.0.
View 3 Replies
Jul 2, 2009
I am doing a elearning project in flex and it consist in a secuence of swf files and a player that load it based in a xml file, the problem is all swf files contents narrations and I need to control the volume of narrations from the player interface, anybody know how I can control the volume of a swf file from flex??
View 1 Replies
Oct 29, 2010
I'm doing a game. sounds are too hard. how i make volume control
View 1 Replies
Aug 11, 2011
how to control sound volume via AS3?[code]
View 4 Replies
Mar 30, 2004
i'm triying to do a slider bar for control volume but all scripts are for vertical or horizontal movement, but i need do it with a light inclination i have been thinking to give to the limits line a value of x an y for upper possition and other value for x and y for lower position but i don't know to do it.
View 3 Replies
May 10, 2006
I'm creating a flash presentation that contains some externally loaded video's (flv), voiceovers and a background music. I would like to be able to control all these audio streams with one control. So basically I'd like to change the volume of the entire movie. Is this possible?
I know there's something like the Sound object with a setVolume() method, but that's only to control one stream as far as I know.
View 1 Replies
Mar 15, 2007
Is it possible to control the volume of a swf which has been loaded using loadmovie ?
I have several loadmovie swfs on the same page so want to only have one animation play sound at the same time.
View 1 Replies
Jun 7, 2007
I'm super stuck on this (getting into the days catagory!) before i start, here's the link to what my XML MP3Player functions like atm;[URL]..The foundations of the AS for this player are from the gotoAndplay.com tutorials, I'm having two problems with adding this volume slider control,
Firstly the SliderBar onload position, it is positioned on the far left of the screen, you can drag it towards the player, once you get it with'in the player it functions correctly moving between the designatd left and right x values correctly, but how can i get it to load into the player rather than out to the left?
And Secondly, by this stage you may have noticed no sound, i've tried alot of different things but to no avail?
[Code]...
View 1 Replies
May 3, 2010
I'm having issues with controlling multiple sound volumes in flash. What I need to have happen is a Background music softly playing while a voice over is also playing.
This is what i have in the first frame of my main timeline
Code:
firstSound = new Sound(BGMusic_mc);
firstSound.attachSound("LatinRockMusic");
firstSound.setVolume(10);
[Code]...
but when it starts to play the voice sound the volume jumps up to 100. I need the first sound to stay at 10 and the voice sound to be at 100.
View 2 Replies
Jun 8, 2011
I'm trying to control the volume of an flv in a video player I'm making. I want it's volume control to be independent of any other content on the page. The Video object is in a Component if that makes any difference.
I am able to adjust the volume of the root (aka MovieClip(this.parent).soundTransform ) but I cannot do it to the component itself.
I have tried applying the SoundTransform to the component itself (which is not a MovieClip I know), I have tried placing the Video object in a MovieClip inside the component and attempted to adjust the volume that way with no success...(obviously there's a lot more code than this)
Code:
_videoDisplay = new Video();
_videoVolume = new SoundTransform(0); // just using 0 so I can tell when it works
this.soundTransform = _videoVolume; // *this refering to the component
[Code].....
View 3 Replies