作者funcy (科技絕緣體)
看板Flash
標題[問題] FMS多人視訊會議
時間Mon Jan 28 10:40:37 2008
請教各位大大~~這回有兩個問題
因為我想做個swf的執行檔
同時具有擷取webcam並發佈到FMS上,以及從FMS上播放已發佈的影像
兩項功能
讓所有人都看得到彼此的視訊畫面
畫面配置圖如下:
http://www.wretch.cc/album/show.php?i=funcy&b=2&f=1124826364&p=0
第一個問題:
我從FMS上播放影像的寫法是
nclive =
new NetConnection();
nclive.
connect(
"rtmp://xxx.xxx.xx.xx/test01");
res1 =
new NetStream(nclive);
res1.
play("1");
main1.
attachVideo(res1); //主持人的大視窗
res2 =
new NetStream(nclive);
res2.
play("2")
view2.
attachVideo(res2);
res3 =
new NetStream(nclive);
res3.
play("3")
view3.
attachVideo(res3);
....
...
..
中間省略,以此類推到
res9 =
new NetStream(nclive);
res9.
play("9")
view9.
attachVideo(res9);
上頭中的main1,view2,view3,....到view9是視訊元件的實體名稱
因為我語法很差~"~只會土法煉鋼,不知道有沒有比較快的寫法??
這是第一個問題...
----------------------------------------------------------------------------
第二個問題是
我想讓大家在執行這個swf檔時,能夠依照執行的先後順序
自動遞增發佈的檔名
當主持人先執行時,發佈的檔名就是1
我目前只會這樣寫...可是這樣只能讓第一個人(主持人)執行而已
nc =
new NetConnection();
nc.
connect(
"rtmp://xxx.xxx.xx.xx/test01");
nsOut =
new NetStream(nc);
nsOut.
attachVideo(
Camera.get());
nsOut.
attachAudio(
Microphone.get());
nsOut.
publish(
"1",
"live");
我希望第二個與會人員執行時就是發佈成檔名2
剩下的人陸續執行swf檔時會發佈為3,4,.....到9
也就是說,當FMS上頭已經有發佈的檔案時,會自動跳過,避免重複
這個部份要怎麼寫呢??這是第二個問題...
以上兩大問題,麻煩解惑了>"<感恩~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.70.82.138
※ 編輯: funcy 來自: 210.70.82.138 (01/28 16:26)