I have something like this:
private var myVideo:Video;
public var videoDisplay:UIComponent;
...
videoDisplay.addChild(myVideo);
...
nsPlay = new NetStream(nc);
nsPlay.addEventListener(NetStatusEvent.NET_STATUS, nsPlayOnStatus);
nsPlay.bufferTime = 0;
nsPlay.play(pro);
myVideo.attachNetStream(nsPlay);
anybody knows how can I change the volume of this stream, I would like to bind the volume to a slider
Use the NetStream::SoundTransform property.
nsPlay.soundTransform.volume = slider.value;
To bind the value of slider to the volume:
BindingUtils.bindProperty(nsPlay.soundTransform, "volume", slider, "value");
Set the slider range as 0 to 1
Use the property soundTransform of the NetStream Object:
var st:SoundTransform=nsPlay.soundTransform;
st.volume=0.5; // 50% volume
nsPlay.soundTransform=st;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With