Skip to content

win32: Add SystemMediaTransportControls support

alvinhochun requested to merge alvinhochun/vlc:alvin/smtc into master

Implements #25258

This adds a module win_smtc which implements SystemMediaTransportControls integration for Windows, and a config option smtc to toggle this (enabled by default).

Implementation notes

This uses C++/WinRT to consume the WinRT APIs needed. As partial mingw-w64 support (recent GCC and Clang, requires C++20) has recently been added to upstream cppwinrt, it is now functional enough to handle the simple APIs of SystemMediaTransportControls. A copy of cppwinrt headers is downloaded in contrib.

Implemented functions

  • Play / pause / stop / prev / next buttons (tested on Windows 10 with native UI and ModernFlyouts)
  • Fast forward / rewind buttons which are supposed to jump using "medium-jump-size" (untested as nothing seems to use it)
  • Auto repeat toggle (tested on Windows 10 with ModernFlyouts)
  • Shuffle toggle (tested on Windows 10 with ModernFlyouts)
  • Timeline display and seeking (tested on Windows 10 with ModernFlyouts)
  • Media metadata display including album artwork (tested on Windows 10 with native UI and ModernFlyouts)

Unimplemented functions

  • Channel up/down buttons
  • Playback rate setting
  • Record button

Merge request reports