Skip to content

Rename media_width/media_height to max_width/max_height #143

Closed

Description

@balloob

Important

This issue waits for #128. If that issue selects letterboxing, the correct name is not max_width. See the Dependency section.

Problem

In roles/artwork/v1.md, the client sends its capability in media_width and media_height. The spec defines these fields as "max width/height in pixels".

The server sends the true size of the encoded image in width and height. Thus one sentence must use both pairs: "width/height MUST NOT exceed the declared media_width/media_height".

The spec does not explain the prefix media_. No other field uses it. The prefix does not show a maximum. The spec also has no other size that the prefix can distinguish.

Change

Old New
media_width max_width
media_height max_height

Change these three locations, all in roles/artwork/v1.md:

  • the channel object in client/hello
  • the artwork object in stream/request-format
  • the constraint sentence in stream/start

No other file uses these fields.

Dependency on #128

Issue #128 selects between two behaviors for the server: letterbox the image, or fit the image inside the declared size.

The current names are correct for the second behavior only. With letterboxing, the server sends every image at exactly the declared size. Then the value is not a maximum, and max_width has the same error as media_width. The correct name is then width and height, or a similar pair.

The fields width and height in stream/start also change. With letterboxing they repeat the declared value, thus #128 can remove them.

Complete #128 first. Then this issue is a rename, or it is part of the larger change.

Compatibility

This change affects the wire protocol. There is no alias.

The prefix possibly comes from Music Assistant or Snapcast. If an implementation uses media_width today, make the two changes together.

README.md is a generated file. Generate it again after the change.


Split from the original issue at the request of @maximmaxim345. The second part is now #152.

Activity

  1. maximmaxim345 commented on Aug 18, 2026

    @maximmaxim345
    Member

    @balloob Can you split this into two issues?

  2. changed the title [-]Rename `media_width`/`media_height` → `max_width`/`max_height`; `cost_individual` → `cost_stored_pubkey`[/-] [+]Rename `media_width`/`media_height` to `max_width`/`max_height`[/+] on Aug 18, 2026
  3. maximmaxim345 commented on Aug 18, 2026

    @maximmaxim345
    Member

    The media_ prefix is definitely out of place, especially since the description already says "max width in pixels".

    One thing to add though: this depends on #128. If that lands on letterboxing (which is what aiosendspin does today), then every image arrives at exactly the declared size, and max_width is wrong for the same reason media_width is. The width/height pair in stream/start would also become a redundant echo of it.

    So let's defer until #128 is resolved.

  4. balloob commented on Aug 18, 2026

    @balloob
    ContributorAuthor

    Agreed, and the effect is possibly larger than a rename.

    If #128 selects letterboxing, the client declares the exact size of each image. Then the value is not a maximum, and max_width has the same error as media_width. The correct pair is then width and height.

    The fields width and height in stream/start also lose their function. They repeat the declared value, thus #128 can remove them.

    I added the dependency to the issue. This issue waits for #128.


    Generated by Claude Code

  5. maximmaxim345 commented on Aug 19, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions