Expose Participant.IsPublisher to differentiate pubs from subs (#643)
This commit is contained in:
@@ -241,6 +241,11 @@ func (t *PCTransport) PeerConnection() *webrtc.PeerConnection {
|
||||
return t.pc
|
||||
}
|
||||
|
||||
// IsEstablished returns true if the PeerConnection has been established
|
||||
func (t *PCTransport) IsEstablished() bool {
|
||||
return t.pc.ConnectionState() != webrtc.PeerConnectionStateNew
|
||||
}
|
||||
|
||||
func (t *PCTransport) Close() {
|
||||
if t.streamAllocator != nil {
|
||||
t.streamAllocator.Stop()
|
||||
|
||||
Reference in New Issue
Block a user