Skip to content

feat(mobile): cast from the video player and Now Playing - #398

Open
altaywtf wants to merge 14 commits into
mainfrom
feat/378c-cast
Open

altaywtf wants to merge 14 commits into
mainfrom
feat/378c-cast

Conversation

@altaywtf

@altaywtf altaywtf commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Change

The players cast to Chromecast and Google TV; stopping resumes on the phone where the receiver stopped. Closes #378.

flowchart LR
  L["Phone player"] -- "connect: position, play state, speed" --> R["Receiver"]
  R -- "session ends: last position, play state" --> L
Loading
Rule Cast
Receiver Default Media Receiver, as web and iOS
URLs api.put.io only, download token, never the session token
Media HLS or MP4 per setting; audio as the original
Subtitles MP4: WebVTT tracks; HLS: its playlist
Speed 2× at most
Notification Cast SDK's; a tap opens the file
  • TV gains no dependency or manifest entry.
  • The player error offers only Open in VLC.
  • Casting has no track choice, sleep timer or mini player.

Validation

  • Code changes: ./gradlew verify and ./gradlew :mobile:assembleProductionDebug :tv:assembleProductionDebug
  • Proof for each matching row of the AGENTS.md proof map

Unverified: no real receiver yet; captures use a fake route.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T20:29:45.896999Z ab7a46a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0af74c0b2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCastPlayback.kt Outdated
Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCast.kt
Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCastPlayback.kt Outdated
Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCastGms.kt Outdated
@altaywtf

Copy link
Copy Markdown
Member Author

Captures: API 37 phone emulator over a fake Cast route (the emulator can't discover receivers). Video player with Cast, the picker, casting, the picker while connected, and back on the phone after Stop casting; Now Playing local and casting; the player error with Open in VLC only.

Video player with Cast in the top bar

Cast to picker

Video casting: Playing on Living room TV

Picker while connected, with Stop casting

Back on the phone where the receiver stopped

Now Playing with Cast

Now Playing casting to a speaker

Player error with Open in VLC only

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d03e68c96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/MobileShell.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a849b8113

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCastPlayback.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee92aabbc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobilePlayerScreen.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c06d2646c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobilePlayerScreen.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 208f4aa53b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mobile/src/main/kotlin/io/putdotio/android/playback/MobileCastGms.kt Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a8a958747

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread DESIGN.md
The players send to Google's Default Media Receiver with the account's
download token on every URL, hand playback over where it stood, and
resume locally where the receiver stopped. The player error offers Open
in VLC only.

Closes #378
Keep the receiver's last status for the handback, decode credential
names before replacing them, cap Cast speed at 2x, send failed media
again, end Cast on sign-out, and open the receiver's file from the Cast
notification.
Wait for a resumed receiver's first status, report refused loads, keep a
paused load paused on handback, resolve session audio's source when
attaching, end Cast at the process's session boundary, reopen the
receiver's file from a fresh process, and make the picker modal.
Resolve the receiver's media on its own when a screen reopens without a
source, so a failed lookup keeps the remote controls, and leave an unknown
resume position unknown when asking for a source.
Track the pending load apart from the reported file, mark the receiver
ready only on an answered status, attach controls before resolving media,
send finished files again, keep a finished file's title and kind, and hand
nothing back from a session that sign-out ended.
Attach to a receiver that already plays the file instead of asking to
resume, stop the handback position where the session ended, end a resumed
session on sign-out, drop an unclaimed handback on sign-out, and give the
picker focus before any receiver is listed.
…fails here

Answer the resume prompt for a file the receiver plays, keep the
receiver's controls through a session reconnect and a local failure,
hold a refused load over older receiver reports, stop session audio for
casting video too, and keep an empty session's sign-out from dropping the
next handback.
…r keys

Show a receiver that plays the file while the phone still resolves it,
converts it or failed it, route Space and the arrows to the receiver, and
let a sign-out end hand nothing back however the SDK orders its reports.
Hand over once a reconnecting session answers, drop the receiver's
position when the viewer chose Start over, tie the remote controls to the
file on screen before its lookup, and let keyboard Back close the casting
Speed sheet first.
A video reopened after its session ended resumes where the receiver
stopped instead of asking, so an earlier Start over no longer drops the
handback.
A report on the same file sent again can describe the media before it,
so only the load's result clears it, and a refusal stands until the next
load.
An earlier load of the same file can no longer settle or fail a later
one.
Hold a load's play intent until its result, send nothing to a session
that sign-out is ending, and draw one top bar over the receiver's
controls.
Treat a receiver that answers with no media as playing nothing, leave
another sender's media unowned, send a stopped file again on Play, and
let picker rows grow with large text.

This branch has not been deployed

No deployments
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.

redesign: video player

1 participant