Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added connection state handling #8

Merged
merged 1 commit into from
Nov 14, 2022
Merged

feat: added connection state handling #8

merged 1 commit into from
Nov 14, 2022

Conversation

marcin-bazyl
Copy link
Collaborator

Added connection state handler that takes ice connection state and dtls connection state and calculates the final overall state from these two.

Also fixed various warnings that I've found are currently on master.

Copy link
Collaborator

@bbaldino bbaldino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small nit, but not a huge deal.

Comment on lines +66 to +74
const newConnectionState = this.evaluateMediaConnectionState();

if (newConnectionState !== this.mediaConnectionState) {
this.mediaConnectionState = newConnectionState;
this.emit(ConnectionStateEvents.ConnectionStateChanged, this.mediaConnectionState);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this and onConnectionStateChange could both leverage some private helper method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

also fixed various warnings that are currently on master
@marcin-bazyl marcin-bazyl merged commit 0c7c7e0 into main Nov 14, 2022
github-actions bot pushed a commit that referenced this pull request Nov 14, 2022
# 1.0.0 (2022-11-14)

### Bug Fixes

* commitlint rules for body ([17d2057](17d2057))
* dependent package vulnerability ([#62](#62)) ([803f296](803f296))
* disable integration tests (temporary) ([#68](#68)) ([75064a4](75064a4))
* enable sonar with quality gate check as part of build ([#54](#54)) ([ae10580](ae10580))
* fix import path ([#27](#27)) ([eee0d88](eee0d88))
* fix the way we do exports ([#19](#19)) ([cc8cc85](cc8cc85))
* handle underlying track being undefined in addTransceiver ([#35](#35)) ([b9bbca6](b9bbca6))
* hookup cspell and eslint for lint-staged ([#16](#16)) ([ad42e8b](ad42e8b))
* make track class abstract and ensure correct track import path ([#21](#21)) ([3fdf38c](3fdf38c))
* media-stream-track param no longer optional ([#31](#31)) ([bf49615](bf49615)), closes [#33](#33)
* release initial package on @webex/webrt-core ([d359d77](d359d77))
* remove blank testbed until needed and correct readme steps ([#17](#17)) ([e31de4f](e31de4f))
* remove error logs ([#44](#44)) ([8a3817e](8a3817e))
* remove redundant git remote ([#52](#52)) ([b6c2d33](b6c2d33))
* sonar fixes ([#56](#56)) ([6e7ce8a](6e7ce8a))
* support ice gathering already being complete in getLocalDescriptionWithIceCandidates ([#40](#40)) ([e22429a](e22429a))
* update adapterjs ([#70](#70)) ([ce6a151](ce6a151))
* update new npm org and registry ([#57](#57)) ([21b16f5](21b16f5))
* update node to use v16 ([#67](#67)) ([4ea99a8](4ea99a8))

### Features

* add getter for remote description ([#66](#66)) ([021b771](021b771))
* add getunderlyingrtcpeerconnection method on peerconnection class ([#64](#64)) ([5abb6be](5abb6be))
* add some more peer connection functionality ([#34](#34)) ([2058263](2058263))
* add support for creating an rtcdatachannel ([#15](#15)) ([66d88b2](66d88b2))
* added connection state handling ([#8](#8)) ([0c7c7e0](0c7c7e0))
* enhance browser support ([#59](#59)) ([3e87bac](3e87bac))
* events object on local-track class ([#24](#24)) ([53b4068](53b4068))
* export the datachannel options type ([#60](#60)) ([8c62610](8c62610))
* expose checkdevicepermissions method ([#65](#65)) ([41ed515](41ed515))
* import webrtc-adapter ([#69](#69)) ([7b3834f](7b3834f))
* migrating the wcme track to webrtc core ([bdee8c6](bdee8c6))
* peer connection events; helper functions ([#23](#23)) ([7fa6727](7fa6727))
haohancom pushed a commit that referenced this pull request Nov 15, 2022
also fixed various warnings that are currently on master
haohancom pushed a commit that referenced this pull request Nov 15, 2022
# 1.0.0 (2022-11-14)

### Bug Fixes

* commitlint rules for body ([17d2057](17d2057))
* dependent package vulnerability ([#62](#62)) ([803f296](803f296))
* disable integration tests (temporary) ([#68](#68)) ([75064a4](75064a4))
* enable sonar with quality gate check as part of build ([#54](#54)) ([ae10580](ae10580))
* fix import path ([#27](#27)) ([eee0d88](eee0d88))
* fix the way we do exports ([#19](#19)) ([cc8cc85](cc8cc85))
* handle underlying track being undefined in addTransceiver ([#35](#35)) ([b9bbca6](b9bbca6))
* hookup cspell and eslint for lint-staged ([#16](#16)) ([ad42e8b](ad42e8b))
* make track class abstract and ensure correct track import path ([#21](#21)) ([3fdf38c](3fdf38c))
* media-stream-track param no longer optional ([#31](#31)) ([bf49615](bf49615)), closes [#33](#33)
* release initial package on @webex/webrt-core ([d359d77](d359d77))
* remove blank testbed until needed and correct readme steps ([#17](#17)) ([e31de4f](e31de4f))
* remove error logs ([#44](#44)) ([8a3817e](8a3817e))
* remove redundant git remote ([#52](#52)) ([b6c2d33](b6c2d33))
* sonar fixes ([#56](#56)) ([6e7ce8a](6e7ce8a))
* support ice gathering already being complete in getLocalDescriptionWithIceCandidates ([#40](#40)) ([e22429a](e22429a))
* update adapterjs ([#70](#70)) ([ce6a151](ce6a151))
* update new npm org and registry ([#57](#57)) ([21b16f5](21b16f5))
* update node to use v16 ([#67](#67)) ([4ea99a8](4ea99a8))

### Features

* add getter for remote description ([#66](#66)) ([021b771](021b771))
* add getunderlyingrtcpeerconnection method on peerconnection class ([#64](#64)) ([5abb6be](5abb6be))
* add some more peer connection functionality ([#34](#34)) ([2058263](2058263))
* add support for creating an rtcdatachannel ([#15](#15)) ([66d88b2](66d88b2))
* added connection state handling ([#8](#8)) ([0c7c7e0](0c7c7e0))
* enhance browser support ([#59](#59)) ([3e87bac](3e87bac))
* events object on local-track class ([#24](#24)) ([53b4068](53b4068))
* export the datachannel options type ([#60](#60)) ([8c62610](8c62610))
* expose checkdevicepermissions method ([#65](#65)) ([41ed515](41ed515))
* import webrtc-adapter ([#69](#69)) ([7b3834f](7b3834f))
* migrating the wcme track to webrtc core ([bdee8c6](bdee8c6))
* peer connection events; helper functions ([#23](#23)) ([7fa6727](7fa6727))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants