Copy link to clipboard
Copied
Good day all,
I am working on a mobile app for video streaming. I have video loading on a frame, upon exit to different frame, sound keeps playing. Looks like SoundMixer.stopAll(); is not working.
Regards
The audio in a net stream is not a regular Sound object, and so you can’t stop the sound using the sound mixer. You should be able to stop the stream like this:
ns.stop();
where ns would be your NetStream variable.
Copy link to clipboard
Copied
Really? No one else has video and sound persisting after navigating away from the frame housing the media asset? Onwards to Titanium ...
Copy link to clipboard
Copied
The audio in a net stream is not a regular Sound object, and so you can’t stop the sound using the sound mixer. You should be able to stop the stream like this:
ns.stop();
where ns would be your NetStream variable.
Copy link to clipboard
Copied
Thank you Colin. I reconfigured to stop video playback altogether upon frame exit, because the sound would stop with your code snippet, but I suspect the video would still be streaming. Users would therefore incur higher 3G data costs. This worked for me.
--------------------------------------------------------------------------------------------------------------
//GoTo Channel Guide
btn_back_HOME.addEventListener(MouseEvent.CLICK,fl_BackHOME);
function fl_BackHOME(event:MouseEvent):void
{
tv1.addEventListener(Event.REMOVED_FROM_STAGE, stopPlay);
function stopPlay(e:Event)
{
tv1.stop();
}
gotoAndStop("home");
}
--------------------------------------------------------------------------------------------------------------
Kind regards