Skip to content

feat(plugin-meetings): update with media-core, web-capabilities#4750

Draft
fnowakow wants to merge 3 commits intowebex:nextfrom
fnowakow:av1-dependencies
Draft

feat(plugin-meetings): update with media-core, web-capabilities#4750
fnowakow wants to merge 3 commits intowebex:nextfrom
fnowakow:av1-dependencies

Conversation

@fnowakow
Copy link
Contributor

@fnowakow fnowakow commented Mar 4, 2026

COMPLETES SPARK-782508

This pull request addresses

Multistream/codec work requires a single source of truth for codec support detection. The plugin-meetings package previously used its own RTCPeerConnection-based H.264 detection logic, which duplicated logic and created unnecessary peer connections. This PR migrates H.264 support detection to use @webex/web-capabilities, which is the canonical capability detection layer for Webex web clients.

by making the following changes

  • meetings/util.ts

    • Import CapabilityState and WebCapabilities from @webex/web-capabilities
    • Remove MeetingsUtil.hasH264Codec (RTCPeerConnection + SDP parsing implementation)
    • Update checkH264Support to use synchronous WebCapabilities.isCapableOfReceivingVideoCodec('video/H264') === CapabilityState.CAPABLE instead of async hasH264Codec()
    • When disableNotifications is true, return immediately without performing any codec check (no "start H.264 download" behavior)
    • Preserve existing event triggers (media:codec:missing / media:codec:loaded) and timing/retry behavior (5s delay, 5min max duration)
  • test/unit/spec/meetings/utils.js

    • Add unit tests for #checkH264Support:
      • Returns immediately without codec check when disableNotifications is true
      • Triggers MEDIA_CODEC_LOADED when H.264 is capable
      • Triggers MEDIA_CODEC_MISSING and schedules retry when H.264 is not capable
      • Logs error and stops retrying when past maxDuration
    • Stub WebCapabilities.isCapableOfReceivingVideoCodec; no RTCPeerConnection usage in tests

Dependencies: @webex/web-capabilities (^1.9.0) and @webex/internal-media-core (2.22.1) are already present in package.json; no changes required.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • Build: yarn build in packages/@webex/plugin-meetings — passes
  • Style: yarn test:style — no new lint issues in changed files
  • Unit tests: yarn test:unit — all meetings unit tests pass (224 passing), including 4 new #checkH264Support tests
  • Verified media:codec:missing and media:codec:loaded events fire correctly via stubbed WebCapabilities.isCapableOfReceivingVideoCodec
  • Verified no RTCPeerConnection usage in H.264 detection path

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Cursor, Composer 1.5
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4750.d3m3l2kee0btzx.amplifyapp.com

@fnowakow fnowakow changed the title feat(plugin-meetings): update dependencies feat(plugin-meetings): update with media-core, web-capabilities Mar 4, 2026
@SomeBody16 SomeBody16 added the validated If the pull request is validated for automation. label Mar 4, 2026
});
});

describe('#checkH264Support', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe could be nice to have additional tests for next things here if we addng tests for this method:

  • No MEDIA_CODEC_MISSING re-triggered logic
  • MEDIA_CODEC_LOADED fires when codec becomes available
  • Logger calls for loaded/missing messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants