aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
709 stars 477 forks source link

Add kind to the meetingReadingessChecker when looking for audio stream #2837

Closed michhyun1 closed 8 months ago

michhyun1 commented 8 months ago

Issue #:

Description of changes:

https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats#:~:text=A%20string%20whose%20value%20is%20%22audio%22%20if%20the%20associated%20MediaStreamTrack%20is%20audio%2Donly%20or%20%22video%22%20if%20the%20track%20contains%20video.%20This%20value%20will%20match%20that%20of%20the%20media%20type%20indicated%20by%20RTCCodecStats.codec%2C%20as%20well%20as%20the%20track%27s%20kind%20property.%20Previously%20called%20mediaType.

MediaType was deprecated and replaced with kind - for backwards compatibility, we can just look for the new field kind or mediaType

Testing:

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

Checklist:

  1. Have you successfully run npm run build:release locally?

    • yes
  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

michhyun1 commented 8 months ago

Seem like we already check for kind in unit test? Can we remove mediaType then?

No we dont. The unit test mocks a RTCStatsReport which has the kind field (the newer field), but for older browsers which still use mediaType we still have to check for mediaType