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