Skip to content

Add CastOptions for subtitles and custom casting parameters - #3

Merged
yinnho merged 1 commit into
masterfrom
feature/cast-options
Sep 2, 2026
Merged

Add CastOptions for subtitles and custom casting parameters#3
yinnho merged 1 commit into
masterfrom
feature/cast-options

Conversation

@yinnho

@yinnho yinnho commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add public CastOptions type: metadata (verbatim DIDL-Lite override), subtitleUri (external subtitles, emitted as a standard subtitle <res> plus the Samsung sec:SubtitleUri extension), subtitleMimeType, mimeType, and upnpClass overrides
  • Accepted as an optional parameter on cast(), castToDevice() and castLocalFile() — fully source-compatible for existing callers
  • DeviceDescriptionParser is now internal (was accidentally public, part of the visibility complaint in [FEATURE] 能否支持携带字幕地址等自定义参数 #2)
  • Documented the new API in README.md / README_zh.md and added an [Unreleased] section to CHANGELOG.md (also covers the discovery fixes from 1f702f8)

Closes #2

Test plan

  • ./gradlew test lint assembleRelease green locally (Java 21 / AGP 8.9.2)
  • Demo app compiles unchanged (default arguments keep all existing call sites source-compatible)
  • Manual: cast with subtitleUri against a Samsung TV (expects sec:SubtitleUri support) and a generic renderer (expects subtitle <res>) — needs real devices

Introduce a public CastOptions type accepted by cast(), castToDevice()
and castLocalFile() (all optional, fully source-compatible):

- metadata: verbatim DIDL-Lite override for full control
- subtitleUri: attach an external subtitle, emitted both as a standard
  subtitle res and the Samsung sec:SubtitleUri extension
- subtitleMimeType / mimeType / upnpClass: override auto-detected values

Also make DeviceDescriptionParser internal (it was accidentally public)
and document the new API in both READMEs and the changelog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yinnho
yinnho merged commit 19da710 into master Sep 2, 2026
2 checks passed
@yinnho
yinnho deleted the feature/cast-options branch September 2, 2026 09:02
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.

[FEATURE] 能否支持携带字幕地址等自定义参数

1 participant