Skip to content

Accept players that list only Opus in strict mode - #617

Merged
maximmaxim345 merged 1 commit into
mainfrom
fix/accept-opus-only-players
Nov 16, 2026
Merged

maximmaxim345 merged 1 commit into
mainfrom
fix/accept-opus-only-players

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

What does this implement/fix?

A server running with allow_noncompliant_clients=False rejected players whose supported_formats listed only opus, and other servers logged a non-compliance warning for them. The spec no longer requires players to list flac or pcm, so these players are compliant.

The server picks Opus for them when PyAV has libopus, and otherwise sends them no stream, like any player that lists only formats the server can't produce.

Related issue or spec PR (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue): bugfix
  • New feature (non-breaking change which adds functionality): new-feature
  • Enhancement to an existing feature: enhancement
  • Breaking change (changes the public API or the protocol in a way that is not backwards compatible): breaking-change
  • Refactor (no behavior change): refactor
  • Documentation only: documentation
  • Maintenance / chore: maintenance
  • CI / workflow change: ci
  • Dependencies bump: dependencies

Copilot AI balanced review requested due to automatic review settings November 16, 2026 15:31
@github-actions github-actions Bot added the bugfix Fixes a bug label Nov 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the change allowing Opus-only players to pass strict-mode hello validation.

No open issues 🎉

What changed in this PR

This PR updates server hello validation to accept Opus-only players in strict mode, aligning with the relaxed codec requirements described in Sendspin/spec#323. Streaming eligibility remains governed by the server’s available encoders.

Changes:

  • Removes the noncompliance check requiring players to advertise FLAC or PCM.
  • Replaces the Opus-only rejection case with a strict-mode acceptance regression test.
File Description
tests/​server/​test_compliance.py Removes the obsolete rejection case and tests strict-mode acceptance of Opus-only players.
aiosendspin/​server/​connection.py Removes the FLAC/PCM requirement and unused AudioCodec import.

Review effort: Balanced

A server with allow_noncompliant_clients=False rejected players whose
supported_formats listed neither flac nor pcm.
@maximmaxim345
maximmaxim345 force-pushed the fix/accept-opus-only-players branch from f492800 to ee0ff47 Compare November 16, 2026 15:37
@maximmaxim345
maximmaxim345 merged commit 9957c39 into main Nov 16, 2026
3 checks passed
@maximmaxim345
maximmaxim345 deleted the fix/accept-opus-only-players branch November 16, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants