Merge branch 'main' of github.com:InvisibleFuture/webrtc
This commit is contained in:
		@@ -61,7 +61,8 @@ export default class ClientList {
 | 
				
			|||||||
                        const client = this.clientlist.find(x => x.id === data.id)
 | 
					                        const client = this.clientlist.find(x => x.id === data.id)
 | 
				
			||||||
                        const option = this.channels[channel.label]
 | 
					                        const option = this.channels[channel.label]
 | 
				
			||||||
                        channel.onopen = event => {
 | 
					                        channel.onopen = event => {
 | 
				
			||||||
                            console.log(data.name, '打开', channel.label, '数据通道')
 | 
					                            console.log('对方打开', channel.label, '数据通道')
 | 
				
			||||||
 | 
					                            console.group('收到音乐数据')
 | 
				
			||||||
                            if (option && option.onopen) {
 | 
					                            if (option && option.onopen) {
 | 
				
			||||||
                                option.onopen(event, client)
 | 
					                                option.onopen(event, client)
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
@@ -73,7 +74,8 @@ export default class ClientList {
 | 
				
			|||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        channel.onclose = event => {
 | 
					                        channel.onclose = event => {
 | 
				
			||||||
                            console.log(data.name, '关闭', channel.label, '数据通道')
 | 
					                            console.groupEnd('收到音乐数据')
 | 
				
			||||||
 | 
					                            console.log('对方关闭', channel.label, '数据通道')
 | 
				
			||||||
                            if (option && option.onclose) {
 | 
					                            if (option && option.onclose) {
 | 
				
			||||||
                                option.onclose(event, client)
 | 
					                                option.onclose(event, client)
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -162,7 +162,9 @@
 | 
				
			|||||||
                    console.log(client.name, '发来音乐列表:', `x${JSON.parse(event.data).list.length}`)
 | 
					                    console.log(client.name, '发来音乐列表:', `x${JSON.parse(event.data).list.length}`)
 | 
				
			||||||
                    console.log('将列表保存到本机记录:', client)
 | 
					                    console.log('将列表保存到本机记录:', client)
 | 
				
			||||||
                    client.musicList = list
 | 
					                    client.musicList = list
 | 
				
			||||||
 | 
					                    console.group('添加音乐')
 | 
				
			||||||
                    client.musicList.forEach(music => musicList.add(music))
 | 
					                    client.musicList.forEach(music => musicList.add(music))
 | 
				
			||||||
 | 
					                    console.groupEnd('添加音乐')
 | 
				
			||||||
                    return
 | 
					                    return
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (type === 'get_music_data') {
 | 
					                if (type === 'get_music_data') {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user