Closed michhyun1 closed 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
Issue #:
Description of changes:
mediaType
is missing from the RTCStatsReport.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 fieldkind
ormediaType
Testing:
Can these tested using a demo application? Please provide reproducible step-by-step instructions.
Checklist:
Have you successfully run
npm run build:release
locally?Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?
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.