player.html
app.js
load()
start()
connect()
msg=websocket
if (msg.type === 'config') {
onConfig(msg);
} else if (msg.type === 'playerCount') {
updateKickButton(msg.count - 1);
} else if (msg.type === 'answer') {
onWebRtcAnswer(msg); //畫布
} else if (msg.type === 'iceCandidate') {
onWebRtcIce(msg.candidate);
} else {
console.log(invalid SS message type: ${msg.type}
);
}
setupWebRtcPlayer(htmlElement, config)
setup.ps1
$Package數組
//Write-Host 自定義輸出格式
foreach($item in $Package){
elseif ($item[3] -eq "min") {
Invoke-Expression 檢查是否安裝
}
}
Invoke-Expression $InstallExe -- 執行是否安裝
Expand-Archive
下載turnserver,解壓
WebRTC // 由 視頻引擎,音頻引擎,會話管理(Session Management) ISAC(音效壓縮)組成 利用 RTP協議傳輸
-- RTP // 常用於流媒體,基於UDP的。 RTCP-->RTP控制協議,通常一起使用
-- StUN/ICE // SFU負責轉發