诡...
This commit is contained in:
@@ -13,16 +13,57 @@
|
||||
</div>
|
||||
<script type="module">
|
||||
import Entanglement from './entanglement.js'
|
||||
const entanglement = new Entanglement({ options: {}, server: {} })
|
||||
const entanglement = new Entanglement({
|
||||
options: {
|
||||
iceServers: [
|
||||
{
|
||||
urls: 'turn:satori.love:3478?transport=udp',
|
||||
username: 'x-username',
|
||||
credential: 'x-password'
|
||||
},
|
||||
{
|
||||
urls: [
|
||||
'stun:stun.1und1.de',
|
||||
'stun:stun.callwithus.com',
|
||||
'stun:stun.ekiga.net',
|
||||
'stun:stun.fwdnet.net',
|
||||
'stun:stun.fwdnet.net:3478',
|
||||
'stun:stun.gmx.net',
|
||||
'stun:stun.iptel.org',
|
||||
'stun:stun.internetcalls.com',
|
||||
'stun:stun.minisipserver.com',
|
||||
'stun:stun.schlund.de',
|
||||
'stun:stun.sipgate.net',
|
||||
'stun:stun.sipgate.net:10000',
|
||||
'stun:stun.softjoys.com',
|
||||
'stun:stun.softjoys.com:3478',
|
||||
'stun:stun.voip.aebc.com',
|
||||
'stun:stun.voipbuster.com',
|
||||
'stun:stun.voipstunt.com',
|
||||
'stun:stun.voxgratia.org',
|
||||
'stun:stun.wirlab.net',
|
||||
'stun:stun.xten.com',
|
||||
'stun:stunserver.org',
|
||||
'stun:stun01.sipphone.com',
|
||||
'stun:stun.zoiper.com'
|
||||
]
|
||||
}
|
||||
],
|
||||
iceCandidatePoolSize: 10, // 限制 ICE 候选者的数量
|
||||
iceTransportPolicy: 'all', // 使用所有可用的候选者
|
||||
bundlePolicy: 'balanced', // 每種類型的內容建立一個單獨的傳輸
|
||||
}, server: {}
|
||||
})
|
||||
entanglement.set('json', {
|
||||
users: { name: 'users', list: [{ name: 'satori' }] },
|
||||
music: { name: 'music', list: [{ name: 'satori' }] },
|
||||
image: { name: 'image', list: [{ name: 'satori' }] }
|
||||
})
|
||||
const store = entanglement.get('json')
|
||||
await new Promise(resolve => setTimeout(resolve, 3000))
|
||||
store.users.name = 'koishi'
|
||||
//users.list.push({ name: 'koishi' })
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
Reference in New Issue
Block a user