求問 groupspec 到底要設什麼

89 views
Skip to first unread message

Gabe

unread,
Feb 26, 2013, 3:13:39 AM2/26/13
to au...@googlegroups.com

dear 大大們

小弟想要做 p2p 的視訊串流

求問 netStream 的 groupspec 到底要設什麼

[簡述]

FMS tool - configurator 產生的 groupspec 跟 client 自己 產生的 key 不一樣

但要帶 configurator 的才看得到

[詳情]

在看過 官方文章 RTMFP groups

Multicast Streaming in Flash Player 10.1 by Tom Krcha 及等等

還是有東西搞不清楚

依第一個 link 教學, 就是抓下 FMS 上的 configurator, 產生設定檔 manifest.f4m, 放在 跟 FMS 提供的 multicast player  一起, 

而 flash Media Live Encoder 3.2 的 stream key 就設 configurator 產生的 Publisher Stream Name

multicast player 就可以播 

(     firefox 可以, 但 chrome 不行,      

     我的環境 

     mac OS X 10.8.2, 

     chrome  25.0.1364.99, player 11,6,602,171; 

     firefox     18.0.1,              player 11,6,602,167

)  但這另外研究了


其實 configurator 產生的 groupspec 明顯地比 client 印出來的長

我在 configurator 設 Group Name 為 "gabe"

拿到 group spec With Authorizations

"G:010121055e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8010c050e67616265210e069c31bf0197340f3bf3d6a7c9e933852eb6ad7e1bfa68decf03218ff9ac1eec00091570617373776f7264"

在自己的 code

var g:GroupSpecifier = newGroupSpecifier(groupName.text);

gstring_ta.text = g.groupspecWithAuthorizations();

只有 "G:050e6761626500" 這麼短


但測試確實要代 configurator的 才看得到東西

代 client 自己產生的 看不到東西

但看了 第二個 link 的 sample (裡面有下載連結 http://downloads.tv.adobe.com/CCE7EE73-1C23-D1F3-EF3E301331E91D76.zip)

private function setupStream():void{

var groupspec:GroupSpecifier = new GroupSpecifier("myGroup/multicastOne");

groupspec.serverChannelEnabled = true;

groupspec.multicastEnabled = true;

stream = new NetStream(netConnection,groupspec.groupspecWithAuthorizations());

stream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

stream.play("multicast");

video.attachNetStream(stream);

}


也是就直接用自己產生的 groupspec

不過他是用 CIRUS 及其 devkey, 我是用公司的 fms (好多什麼 key 搞不太清楚)

另外 configurator 產生的 key 有分 groupspecWithoutAuthorizations 跟 groupspecWithAuthorizations, 值不一樣

但在 client 印出來卻都一樣, 看過 API 文件 也說都跟 toString() 一樣

懇請 大大們 指導了

Gabe

unread,
Feb 26, 2013, 10:36:27 PM2/26/13
to au...@googlegroups.com
先分享一下
反解 configurator 才注意到有幾個設定

以下 "分別" 測試設定 看值的差別 

groupName 'gabe' 直接產生

groupspecWithAuthorizations, groupspecWithoutAuthorizations, tostring 值都一樣

makeUnique() 字串變長了, 跟直接產生不一樣

groupspecWithAuthorizations, groupspecWithoutAuthorizations 兩個值一樣, toString 不一樣

peerToPeerDisabled  跟直接產生不一樣

不過 groupspecWithAuthorizations, groupspecWithoutAuthorizations, toString 三個值都一樣

設 setPublishPassword() 跟直接產生不一樣

groupspecWithAuthorizations 跟 toString 值一樣

groupspecWithoutAuthorizations 不一樣




Gabe於 2013年2月26日星期二UTC+8下午4時13分39秒寫道:
Gabe於 2013年2月26日星期二UTC+8下午4時13分39秒寫道:

Gabe

unread,
Feb 27, 2013, 2:24:15 AM2/27/13
to au...@googlegroups.com
ha 不好意思
我想通了

既然用了 makeUnique() 就不能希望兩邊產生一模一樣的東西

拿掉就是了


Gabe於 2013年2月26日星期二UTC+8下午4時13分39秒寫道:
Reply all
Reply to author
Forward
0 new messages