Playhead 1.0.4
dotnet add package Playhead --version 1.0.4
NuGet\Install-Package Playhead -Version 1.0.4
<PackageReference Include="Playhead" Version="1.0.4" />
<PackageVersion Include="Playhead" Version="1.0.4" />
<PackageReference Include="Playhead" />
paket add Playhead --version 1.0.4
#r "nuget: Playhead, 1.0.4"
#:package Playhead@1.0.4
#addin nuget:?package=Playhead&version=1.0.4
#tool nuget:?package=Playhead&version=1.0.4
Playhead
Playhead is a modern, highly professional C# library that serves as a wrapper around the Windows NowPlayingSessionManager (NPSM) and System Media Transport Controls (SMTC) private APIs.
Designed for 2026 and beyond, Playhead allows developers to seamlessly interact with media sessions across the system. It enables reading "Now Playing" data (metadata, timeline, playback status) and controlling media playback remotely for supported applications such as Spotify, Chrome, Edge, VLC, and Windows Media Player.
Table of Contents
- Features
- Compatibility
- Supported Applications
- Installation
- Quick Start
- Documentation
- Contributing
- Security
- License
Features
- Full Media Metadata Access: Retrieve title, artist, album, genres, and even high-quality thumbnail streams.
- Playback Control: Programmatically Play, Pause, Next, Previous, Stop, and seek timeline positions.
- Session Tracking: Monitor the lifecycle of all media sessions active on the Windows machine.
- Modern & Legacy .NET Support: Targets everything from
.NET Framework 4.5and.NET Standard 1.1through.NET 11.0, coveringnetstandard1.1–2.1,netcoreapp3.0/3.1,net5.0–net11.0, andnet45–net481. - Nullable Reference Types: Built with modern C# standards including null-safety and
LangVersion=preview. - Debugger-Friendly: Ships with SourceLink and symbol packages (
.snupkg) for step-through debugging straight from NuGet.
Compatibility
Playhead requires Windows 10 Version 1511 (Build 10586) or newer.
Note on UWP/WinUI: If you are building a modern Windows App (UWP/WinUI 3), you must ensure your app manifest includes the globalMediaControl capability to avoid access denied exceptions.
<uap7:Capability Name="globalMediaControl" />
Note on threading: SessionListChanged and MediaPlaybackDataChanged are delivered through COM callbacks from an out-of-process Windows service. If you create NowPlayingSessionManager on a Single-Threaded Apartment (STA) thread (e.g. a WinForms/WPF UI thread), that thread must keep pumping its message loop (Application.Run, etc.) for events to arrive. Plain console apps/background threads that don't opt into [STAThread] run as a Multi-Threaded Apartment (MTA) by default and don't need a message loop.
Supported Applications
Playhead can interact with any application that integrates with the Windows SMTC APIs. For a comprehensive list of supported apps and browsers, check our Supported Apps Documentation.
Installation
You can install Playhead via the NuGet Package Manager:
dotnet add package Playhead
Quick Start
using Playhead.Data;
using Playhead.Enums;
using Playhead.Models;
using Playhead.Managers;
using Playhead.Sessions;
// Initialize the Session Manager
var manager = new NowPlayingSessionManager();
// Get the current active session
NowPlayingSession session = manager.CurrentSession;
if (session != null)
{
// Activate the playback data source to read metadata / control playback
MediaPlaybackDataSource src = session.ActivateMediaPlaybackDataSource();
MediaObjectInfo mediaInfo = src.GetMediaObjectInfo();
Console.WriteLine($"Currently Playing: {mediaInfo.Title} by {mediaInfo.Artist}");
// Pause the playback
src.SendMediaPlaybackCommand(MediaPlaybackCommands.Pause);
}
Reacting to Changes
Playhead raises events both when the active session changes and when the current session's playback data changes, so you don't have to poll:
manager.SessionListChanged += (sender, args) =>
{
NowPlayingSession session = manager.CurrentSession;
if (session != null)
{
MediaPlaybackDataSource src = session.ActivateMediaPlaybackDataSource();
src.MediaPlaybackDataChanged += (s, e) =>
{
MediaTimelineProperties timeline = src.GetMediaTimelineProperties();
Console.WriteLine($"Position: {timeline.Position} / {timeline.EndTime}");
};
}
};
Disposal
NowPlayingSessionManager, NowPlayingSession, NowPlayingSessionInfo, and MediaPlaybackDataSource wrap native COM resources and implement IDisposable. Dispose of them once you're done so the underlying COM references and event registrations are released deterministically instead of waiting for garbage collection:
using NowPlayingSessionManager manager = new();
NowPlayingSession session = manager.CurrentSession;
if (session != null)
{
using MediaPlaybackDataSource src = session.ActivateMediaPlaybackDataSource();
MediaObjectInfo mediaInfo = src.GetMediaObjectInfo();
Console.WriteLine($"Currently Playing: {mediaInfo.Title} by {mediaInfo.Artist}");
}
If you're subscribing to SessionListChanged / MediaPlaybackDataChanged for the lifetime of your application, keep the manager (and any activated data sources) alive for as long as you need those events, and dispose of them during shutdown instead.
See the samples folder for complete, runnable console, .NET Framework, and UWP examples.
Documentation
Playhead ships with full XML documentation comments, so IntelliSense will guide you through the entire public API directly in Visual Studio / VS Code / Rider. For deeper API exploration, browse the src/Playhead source directly.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for details on our development setup, coding guidelines, and the process for submitting pull requests.
Security
If you discover a security vulnerability, please follow the responsible disclosure process described in SECURITY.md rather than opening a public issue.
License
This project is licensed under the MIT License - see the LICENSE file for details. Copyright © 2026 Taiizor
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
| .NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard1.1 is compatible. netstandard1.2 is compatible. netstandard1.3 is compatible. netstandard1.4 is compatible. netstandard1.5 is compatible. netstandard1.6 is compatible. netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Universal Windows Platform | uap was computed. uap10.0 was computed. |
| Windows Phone | wpa81 was computed. |
| Windows Store | netcore was computed. netcore45 was computed. netcore451 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.0
- No dependencies.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETFramework 4.8.1
- No dependencies.
-
.NETStandard 1.1
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.2
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.4
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.5
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.6
- NETStandard.Library (>= 1.6.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.