Add Windows SystemMediaTransportControls support for MSVC builds#1926
Draft
Add Windows SystemMediaTransportControls support for MSVC builds#1926
Conversation
Copilot
AI
changed the title
[WIP] Add support for MSVC on Windows to report media playback
Add Windows SystemMediaTransportControls support for MSVC builds
Dec 26, 2025
Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
e84dab6 to
597f983
Compare
Member
|
@copilot |
Handle case where COM/WinRT apartment is already initialized by Qt or other components. Track whether we initialized the apartment to avoid uninitializing it if we didn't initialize it. Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Contributor
Author
... Fixed in commit 02c1596. The crash was caused by attempting to initialize the WinRT apartment when it was already initialized by Qt or another component. The fix:
This allows WindowsMediaController to work regardless of whether the COM/WinRT apartment was previously initialized. |
jonaski
requested changes
Dec 28, 2025
- Fix album cover URL: use result.album_cover.cover_url instead of result.cover_url - Convert WINDOWS_MEDIA_CONTROLS to optional_component for better configuration management Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Member
|
@copilot
Callstack: |
Replace async GetFileFromPathAsync().get() with synchronous CreateFromUri() to avoid blocking STA thread. This prevents the "sta thread blocking wait" assertion failure. Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
Contributor
Author
... Fixed in commit d2afa8f. The crash was caused by calling
This avoids blocking the STA thread and prevents the assertion failure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Recent Updates
STA Thread Blocking Fix:
GetFileFromPathAsync().get()with synchronousCreateFromUri()QUrl::fromLocalFile()Windows::Foundationnamespace forUriclassPrevious Code Review Fixes:
result.album_cover.cover_urloptional_componentInitial Crash Fix:
winrt::init_apartment()crash by handling pre-initialized apartmentsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.