MPNowPlayingInfo is available on iOS,MacOS, and TvOS (#2178)
* Added MPNowPlaying info to MacOS/TvOS
This commit is contained in:
Родитель
1a2633ca1e
Коммит
e7a5dd2af1
|
@ -7,8 +7,8 @@
|
||||||
// Copyright 2011, Xamarin Inc
|
// Copyright 2011, Xamarin Inc
|
||||||
//
|
//
|
||||||
|
|
||||||
#if !TVOS && !MONOMAC
|
|
||||||
|
|
||||||
|
#if XAMCORE_2_0
|
||||||
using XamCore.Foundation;
|
using XamCore.Foundation;
|
||||||
using XamCore.ObjCRuntime;
|
using XamCore.ObjCRuntime;
|
||||||
|
|
||||||
|
@ -229,4 +229,4 @@ namespace XamCore.MediaPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !TVOS
|
#endif
|
|
@ -97,10 +97,8 @@ namespace XamCore.MediaPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NSUInteger -> MPMediaItem.h
|
// NSUInteger -> MPMediaItem.h
|
||||||
[NoMac]
|
|
||||||
[Native]
|
[Native]
|
||||||
[Flags]
|
[Flags]
|
||||||
[NoTV]
|
|
||||||
public enum MPMediaType : nuint_compat_int {
|
public enum MPMediaType : nuint_compat_int {
|
||||||
#if !XAMCORE_2_0
|
#if !XAMCORE_2_0
|
||||||
[Obsolete ("Use Shorter name Music")]
|
[Obsolete ("Use Shorter name Music")]
|
||||||
|
@ -119,18 +117,25 @@ namespace XamCore.MediaPlayer {
|
||||||
AnyAudio = 0x00ff,
|
AnyAudio = 0x00ff,
|
||||||
|
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
Movie = 1 << 8,
|
Movie = 1 << 8,
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
TVShow = 1 << 9,
|
TVShow = 1 << 9,
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
VideoPodcast = 1 << 10,
|
VideoPodcast = 1 << 10,
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
MusicVideo = 1 << 11,
|
MusicVideo = 1 << 11,
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
VideoITunesU = 1 << 12,
|
VideoITunesU = 1 << 12,
|
||||||
[iOS (7,0)]
|
[iOS (7,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
HomeVideo = 1 << 13,
|
HomeVideo = 1 << 13,
|
||||||
[iOS (5,0)]
|
[iOS (5,0)]
|
||||||
|
[Mac (10,12,2)]
|
||||||
TypeAnyVideo = 0xff00,
|
TypeAnyVideo = 0xff00,
|
||||||
#if XAMCORE_2_0
|
#if XAMCORE_2_0
|
||||||
Any = 0xFFFFFFFFFFFFFFFF
|
Any = 0xFFFFFFFFFFFFFFFF
|
||||||
|
@ -319,6 +324,7 @@ namespace XamCore.MediaPlayer {
|
||||||
|
|
||||||
[Mac (10,12,2)]
|
[Mac (10,12,2)]
|
||||||
[iOS (10,0)]
|
[iOS (10,0)]
|
||||||
|
[TV (10,0)]
|
||||||
[Native]
|
[Native]
|
||||||
public enum MPNowPlayingInfoMediaType : nuint
|
public enum MPNowPlayingInfoMediaType : nuint
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,20 +51,28 @@ namespace XamCore.MediaPlayer {
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
#if XAMCORE_2_0
|
||||||
}
|
}
|
||||||
|
#if MONOMAC || TVOS
|
||||||
[NoMac]
|
[Mac (10,12,2, onlyOn64: true)]
|
||||||
[NoTV]
|
[Static]
|
||||||
|
#else
|
||||||
[BaseType (typeof (MPMediaEntity))]
|
[BaseType (typeof (MPMediaEntity))]
|
||||||
|
#endif
|
||||||
interface MPMediaItem {
|
interface MPMediaItem {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !MONOMAC
|
||||||
[Since (4,2)]
|
[Since (4,2)]
|
||||||
|
[NoMac]
|
||||||
|
[NoTV]
|
||||||
[Export ("persistentIDPropertyForGroupingType:")][Static]
|
[Export ("persistentIDPropertyForGroupingType:")][Static]
|
||||||
string GetPersistentIDProperty (MPMediaGrouping groupingType);
|
string GetPersistentIDProperty (MPMediaGrouping groupingType);
|
||||||
|
|
||||||
[Since (4,2)]
|
[Since (4,2)]
|
||||||
|
[NoMac]
|
||||||
|
[NoTV]
|
||||||
[Export ("titlePropertyForGroupingType:")][Static]
|
[Export ("titlePropertyForGroupingType:")][Static]
|
||||||
string GetTitleProperty (MPMediaGrouping groupingType);
|
string GetTitleProperty (MPMediaGrouping groupingType);
|
||||||
|
#endif
|
||||||
[Since (3,0)]
|
[Since (3,0)]
|
||||||
[Field ("MPMediaItemPropertyPersistentID")]
|
[Field ("MPMediaItemPropertyPersistentID")]
|
||||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||||
|
@ -1369,6 +1377,7 @@ namespace XamCore.MediaPlayer {
|
||||||
NSString PropertyDefaultPlaybackRate { get; }
|
NSString PropertyDefaultPlaybackRate { get; }
|
||||||
|
|
||||||
[iOS (9,0)]
|
[iOS (9,0)]
|
||||||
|
[TV (10,0)]
|
||||||
[Internal]
|
[Internal]
|
||||||
[Field ("MPNowPlayingInfoPropertyAvailableLanguageOptions")]
|
[Field ("MPNowPlayingInfoPropertyAvailableLanguageOptions")]
|
||||||
NSString PropertyAvailableLanguageOptions { get; }
|
NSString PropertyAvailableLanguageOptions { get; }
|
||||||
|
@ -1409,7 +1418,7 @@ namespace XamCore.MediaPlayer {
|
||||||
NSString PropertyIsLiveStream { get; }
|
NSString PropertyIsLiveStream { get; }
|
||||||
|
|
||||||
[iOS (10,3)]
|
[iOS (10,3)]
|
||||||
[Mac (10,12,3)]
|
[TV (10,2)]
|
||||||
[Field ("MPNowPlayingInfoPropertyAssetURL")]
|
[Field ("MPNowPlayingInfoPropertyAssetURL")]
|
||||||
NSString PropertyAssetUrl { get; }
|
NSString PropertyAssetUrl { get; }
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче