Skip to content

media: Replace rtcStats singleton with factory function#832

Open
havardholvik wants to merge 2 commits intomainfrom
havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory
Open

media: Replace rtcStats singleton with factory function#832
havardholvik wants to merge 2 commits intomainfrom
havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory

Conversation

@havardholvik
Copy link
Contributor

Description

Summary:
Replace singleton rtcStats connection object with factory function for better lifecycle control and testability.

Related Issue:

Testing

Unit tests added.

Checklist

  • My code follows the project's coding standards.
  • Prefixed the PR title and commit messages with the service or package name
  • I have written unit tests (if applicable).
  • I have updated the documentation (if applicable).
  • By submitting this pull request, I confirm that my contribution is made
    under the terms of the MIT license.

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

🦋 Changeset detected

Latest commit: aa2e9eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@whereby.com/media Major
@whereby.com/core Minor
@whereby.com/browser-sdk Patch
@whereby.com/assistant-sdk Patch
@whereby.com/react-native-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@havardholvik
Copy link
Contributor Author

/canary

@havardholvik havardholvik force-pushed the havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory branch from db26008 to 3ae50b3 Compare December 18, 2025 11:41
@havardholvik
Copy link
Contributor Author

/canary

@havardholvik havardholvik force-pushed the havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory branch from 3ae50b3 to 5502b2a Compare December 18, 2025 12:40
@havardholvik
Copy link
Contributor Author

/canary

1 similar comment
@havardholvik
Copy link
Contributor Author

/canary

@github-actions
Copy link
Contributor

🚀 The canary releases have been published to npm.

You can test the releases by installing the newly published versions:

pnpm add @whereby.com/assistant-sdk@0.0.0-canary-20251218205351
pnpm add @whereby.com/browser-sdk@0.0.0-canary-20251218205351
pnpm add @whereby.com/core@0.0.0-canary-20251218205351
pnpm add @whereby.com/media@0.0.0-canary-20251218205351
pnpm add @whereby.com/react-native-sdk@0.0.0-canary-20251218205351

@havardholvik havardholvik marked this pull request as ready for review December 19, 2025 10:32
Copy link
Contributor

@kevinwhereby kevinwhereby left a comment

Choose a reason for hiding this comment

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

Added all the piping to init this in bundles/stats.js and pass it around where required and it all works as expected 🎉

@havardholvik havardholvik force-pushed the havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory branch 2 times, most recently from f6fb6f3 to 429aeeb Compare January 7, 2026 07:48
@havardholvik
Copy link
Contributor Author

/canary

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

🚀 The canary releases have been published to npm.

You can test the releases by installing the newly published versions:

pnpm add @whereby.com/assistant-sdk@0.0.0-canary-20260107113229
pnpm add @whereby.com/browser-sdk@0.0.0-canary-20260107113229
pnpm add @whereby.com/core@0.0.0-canary-20260107113229
pnpm add @whereby.com/media@0.0.0-canary-20260107113229
pnpm add @whereby.com/react-native-sdk@0.0.0-canary-20260107113229

@havardholvik havardholvik force-pushed the havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory branch from 429aeeb to d015099 Compare January 7, 2026 16:06
@havardholvik
Copy link
Contributor Author

/canary

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🚀 The canary releases have been published to npm.

You can test the releases by installing the newly published versions:

pnpm add @whereby.com/assistant-sdk@0.0.0-canary-20260108073026
pnpm add @whereby.com/browser-sdk@0.0.0-canary-20260108073026
pnpm add @whereby.com/core@0.0.0-canary-20260108073026
pnpm add @whereby.com/media@0.0.0-canary-20260108073026
pnpm add @whereby.com/react-native-sdk@0.0.0-canary-20260108073026

Due to breaking change in media package, this connection needs to be
initialized outside the media package itself.
@havardholvik havardholvik force-pushed the havard/cob-2302-sdk-replace-singleton-rtcstats-connection-with-factory branch from d015099 to aa2e9eb Compare January 13, 2026 07:38
@havardholvik
Copy link
Contributor Author

/canary

@github-actions
Copy link
Contributor

🚀 The canary releases have been published to npm.

You can test the releases by installing the newly published versions:

pnpm add @whereby.com/assistant-sdk@0.0.0-canary-20260113080148
pnpm add @whereby.com/browser-sdk@0.0.0-canary-20260113080148
pnpm add @whereby.com/core@0.0.0-canary-20260113080148
pnpm add @whereby.com/media@0.0.0-canary-20260113080148
pnpm add @whereby.com/react-native-sdk@0.0.0-canary-20260113080148

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