mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
@@ -401,8 +401,11 @@ func (peer *WebRTCPeerCtx) SetVideo(r types.PeerVideoRequest) error {
|
|||||||
|
|
||||||
// send video signal if modified
|
// send video signal if modified
|
||||||
if modified {
|
if modified {
|
||||||
// in goroutine because of mutex and we don't want to block
|
go func() {
|
||||||
go peer.session.Send(event.SIGNAL_VIDEO, peer.Video())
|
// in goroutine because of mutex and we don't want to block
|
||||||
|
resolvedVideo := peer.Video()
|
||||||
|
peer.session.Send(event.SIGNAL_VIDEO, resolvedVideo)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -453,8 +456,11 @@ func (peer *WebRTCPeerCtx) SetAudio(r types.PeerAudioRequest) error {
|
|||||||
|
|
||||||
// send video signal if modified
|
// send video signal if modified
|
||||||
if modified {
|
if modified {
|
||||||
// in goroutine because of mutex and we don't want to block
|
go func() {
|
||||||
go peer.session.Send(event.SIGNAL_AUDIO, peer.Audio())
|
// in goroutine because of mutex and we don't want to block
|
||||||
|
resolvedAudio := peer.Audio()
|
||||||
|
peer.session.Send(event.SIGNAL_AUDIO, resolvedAudio)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user