RTCDataChannel.readyState getter

This commit is contained in:
Fernando Jiménez Moreno 2020-06-11 12:07:55 +02:00
parent 9d456d5d17
commit 7db485aeb2
4 changed files with 47 additions and 4 deletions

View file

@ -320,7 +320,8 @@ impl RTCPeerConnection {
DataChannelEvent::Close => channel.on_close(),
DataChannelEvent::Error(error) => channel.on_error(error),
DataChannelEvent::OnMessage(message) => channel.on_message(message),
_ => unreachable!(),
DataChannelEvent::StateChange(state) => channel.on_state_change(state),
DataChannelEvent::NewChannel => unreachable!(),
}
} else {
debug_assert!(false, "Got an event for an unregistered data channel");