Skip to content

[maxHeight] Expose maxWidth/maxHeight layer constraints in LayerInfo - #525

Open
bcostdolby wants to merge 1 commit into
mainfrom
devin/1787721576-layer-max-dimensions
Open

[maxHeight] Expose maxWidth/maxHeight layer constraints in LayerInfo#525
bcostdolby wants to merge 1 commit into
mainfrom
devin/1787721576-layer-max-dimensions

Conversation

@bcostdolby

@bcostdolby bcostdolby commented Aug 26, 2026

Copy link
Copy Markdown

Summary

The server already honours layer.maxWidth / layer.maxHeight on the select and project signaling commands (it maps them to setMaximumDimensions()), and View.select() / View.project() / View.connect({ layer }) forward the layer object verbatim — so this works at runtime today, but the public LayerInfo type only declared the encoding/spatial/temporal ids, so TS consumers were rejected and no one could discover the feature. This PR is documentation + typings only; no runtime change, and nothing in the SDK strips or validates unknown layer fields (verified in View.js and Signaling.js, which pass layer/mapping straight through to signaling.cmd).

The semantic point worth capturing for consumers (and the reason this matters for multiview): the two kinds of layer fields behave very differently.

// Small tile: cap the resolution, ABR still picks the best layer that fits.
view.project(sourceId, [{ media: 'video', trackId: 'video', layer: { maxHeight: 180 } }])

// Fixed layer: pins the track to encoding 'h', ABR is bypassed.
view.project(sourceId, [{ media: 'video', trackId: 'video', layer: { encodingId: 'h' } }])

// Reset the restriction.
view.select({ maxWidth: 0, maxHeight: 0 })

Naming matches the native SDKs (LayerDataSelection.withConstraints() on Android, initWithMaxSpatialLayerId:maxTemporalLayerId:maxWidth:maxHeight: on iOS) so the platforms stay consistent.

Generated dist/millicast.d.ts picks the fields up from src/types/index.d.ts via the normal build; lint, tsc --noEmit, unit tests (29 suites / 173 tests) and npm run build pass in packages/millicast-sdk.

Jira: https://opentelly.atlassian.net/browse/OPTI-4136 (epic: https://opentelly.atlassian.net/browse/OPTI-4113)

Link to Devin session: https://dolby.devinenterprise.com/sessions/6e4f2fcc6cea412da1d3c06714c2a817
Requested by: @bcostdolby


Open in Devin Review

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f64b0de

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

This PR includes changesets to release 1 package
Name Type
@millicast/sdk Minor

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@devin-ai-integration
devin-ai-integration Bot requested a review from a team August 26, 2026 05:21
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.

1 participant