首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Actionscript-2中将流视频的所有声音静音

在Actionscript-2中将流视频的所有声音静音
EN

Stack Overflow用户
提问于 2011-03-23 05:42:16
回答 1查看 2.1K关注 0票数 0

所以我在试着静音一段流视频。现在,我在同一目录中使用一个。

代码语言:javascript
复制
var flvURL = 'flvInThisDirectory.flv'; 
var netConn:NetConnection = new NetConnection();   
netConn.connect(null);   
var netStream:NetStream = new NetStream(netConn);   
my_video2.attachVideo(netStream); 
    netStream.setBufferTime(0);
    netStream.play(flvURL);  

    //all of the below are different, supposedly valid attempts to mute sound for 
    //this stream.. none of them work

    var nsst = new SoundTransform(0);
    nsst.volume = 0;
    netStream.soundTransform=nsst;
    netStream.fromSrvr.attachAudio(false);
    var so = new Sound(netStream); 
    so.setVolume(0);    
    stopAllSounds(); 

但还是有声音。如果URL也是远程的,这也是相同的。有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2011-03-23 06:05:24

哇哦。

"var so =新声音(NetStream);“

把这个写成

"var so = new Sound();“

我甚至都不会给自己加一分。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5398192

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档