Skip to content

Add StopMedia method to ScreenDevice#18

Open
habibrehmansg wants to merge 1 commit intousausa:mainfrom
habibrehmansg:usb-additional-commands
Open

Add StopMedia method to ScreenDevice#18
habibrehmansg wants to merge 1 commit intousausa:mainfrom
habibrehmansg:usb-additional-commands

Conversation

@habibrehmansg
Copy link
Copy Markdown
Contributor

Introduce StopMedia() to ScreenDevice to send command 111 and invoke RequestResponse(), returning a boolean success indicator. This adds a simple API to stop media playback from the device by preparing the command header and issuing the request.

Sending JPEG to a device that may be having a media playback will result in flickering. PNG overlays transparency properly do it does not have this issue, but JPEG is superior in term of frame rate (~3x).

Introduce StopMedia() to ScreenDevice to send command 111 and invoke RequestResponse(), returning a boolean success indicator. This adds a simple API to stop media playback from the device by preparing the command header and issuing the request.
@habibrehmansg
Copy link
Copy Markdown
Contributor Author

Hi! Thanks for reviewing this PR.

I've been working with the Turing USB protocol (rev 1.1) and have identified several additional commands that the device supports beyond what's currently in ScreenDevice. Would you be interested in PRs for any of these?

Storage management:

  • List files (command 99)
  • Get storage info (command 100)
  • Open file for writing (command 38)
  • Write file contents (command 39)
  • Delete file (command 42)

Media playback:

  • Play image from device storage (command 98)
  • Play video from device storage (command 110/113)

Settings:

  • Save device settings — brightness, startup mode, rotation, sleep, offline (command 125)

These have been validated against working implementations. Happy to contribute them if they'd be a good fit for this library.

@usausa
Copy link
Copy Markdown
Owner

usausa commented Mar 20, 2026

I welcome pull requests.
I've left the TSS USB version alone after doing some basic checks, so if there are no problems, including with storage management, I'd like to make it the official version.

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.

2 participants