This repository has been archived on 2025-09-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
XericLibrary-OLD/Runtime/WindowsSystem/SMTC.cs

35 lines
900 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace XericLibrary.Runtime.WindowsSystem
{
/// <summary>
/// SMTC Transport Protocol Example Library
/// </summary>
/// <remarks>
/// SMTC是System Media Transport Controls的缩写
/// 它是一组通用于所有Windows 10设备的控件
/// 为用户提供一致的方法来控制使用MediaPlayer进行播放的所有正在运行的应用程序的媒体播放12。
/// </remarks>
public static class SMTC
{
//void aaa()
//{
// MediaPlayer mediaPlayer = new MediaPlayer();
// // 获取SMTC
// SystemMediaTransportControls smtc = SystemMediaTransportControls.GetForCurrentView();
// // 获取当前播放的媒体项的显示属性
// MediaItemDisplayProperties props = smtc.DisplayUpdater.MusicProperties;
// // 获取歌曲信息
// string title = props.Title;
// string artist = props.Artist;
// string albumArtist = props.AlbumArtist;
//}
}
}