SHARE
TWEET

ApiDefinition.cs

a guest Mar 28th, 2017 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using CoreGraphics;
  3. using Foundation;
  4. using ObjCRuntime;
  5. using UIKit;
  6.  
  7. namespace RTSPPlayer
  8. {
  9.     [Static]
  10.     //[Verify(ConstantsInterfaceAssociation)]
  11.     public partial interface Constants
  12.     {
  13.         // extern NSString *const AVOptionNameAVFormatName;
  14.         [Field("AVOptionNameAVFormatName", "__Internal")]
  15.         NSString AVOptionNameAVFormatName { get; }
  16.  
  17.         // extern NSString *const AVOptionNameAVProbeSize;
  18.         [Field("AVOptionNameAVProbeSize", "__Internal")]
  19.         NSString AVOptionNameAVProbeSize { get; }
  20.  
  21.         // extern NSString *const AVOptionNameAVAnalyzeduration;
  22.         [Field("AVOptionNameAVAnalyzeduration", "__Internal")]
  23.         NSString AVOptionNameAVAnalyzeduration { get; }
  24.  
  25.         // extern NSString *const AVOptionNameHttpUserAgent;
  26.         [Field("AVOptionNameHttpUserAgent", "__Internal")]
  27.         NSString AVOptionNameHttpUserAgent { get; }
  28.  
  29.         // extern NSString *const AVOptionNameHttpHeader;
  30.         [Field("AVOptionNameHttpHeader", "__Internal")]
  31.         NSString AVOptionNameHttpHeader { get; }
  32.  
  33.         // extern NSString *const AVOptionNameHttpContentType;
  34.         [Field("AVOptionNameHttpContentType", "__Internal")]
  35.         NSString AVOptionNameHttpContentType { get; }
  36.  
  37.         // extern NSString *const AVOptionNameHttpTimeout;
  38.         [Field("AVOptionNameHttpTimeout", "__Internal")]
  39.         NSString AVOptionNameHttpTimeout { get; }
  40.  
  41.         // extern NSString *const AVOptionNameHttpMimeType;
  42.         [Field("AVOptionNameHttpMimeType", "__Internal")]
  43.         NSString AVOptionNameHttpMimeType { get; }
  44.  
  45.         // extern NSString *const AVOptionNameHttpCookies;
  46.         [Field("AVOptionNameHttpCookies", "__Internal")]
  47.         NSString AVOptionNameHttpCookies { get; }
  48.  
  49.         // extern NSString *const AVOptionNameHttpAuthType;
  50.         [Field("AVOptionNameHttpAuthType", "__Internal")]
  51.         NSString AVOptionNameHttpAuthType { get; }
  52.  
  53.         // extern NSString *const AVOptionNameHttpReconnect;
  54.         [Field("AVOptionNameHttpReconnect", "__Internal")]
  55.         NSString AVOptionNameHttpReconnect { get; }
  56.  
  57.         // extern NSString *const AVPErrorDomain;
  58.         [Field("AVPErrorDomain", "__Internal")]
  59.         NSString AVPErrorDomain { get; }
  60.     }
  61.  
  62.     // @interface AVPLicense : NSObject
  63.     [BaseType(typeof(NSObject))]
  64.     public interface AVPLicense
  65.     {
  66.         // +(BOOL)register:(NSString * _Nonnull)licenseString;
  67.         [Static]
  68.         [Export("register:")]
  69.         bool Register(string licenseString);
  70.     }
  71.  
  72.     //[Verify(ConstantsInterfaceAssociation)]
  73.     public partial interface Constants
  74.     {
  75.         // extern double AVPlayerTouchVersionNumber;
  76.         [Field("AVPlayerTouchVersionNumber", "__Internal")]
  77.         double AVPlayerTouchVersionNumber { get; }
  78.  
  79.         // extern const unsigned char [] AVPlayerTouchVersionString;
  80.         [Field("AVPlayerTouchVersionString", "__Internal")]
  81.         NSString AVPlayerTouchVersionString { get; }
  82.     }
  83.  
  84.     // @protocol CustomizedAVSource <NSObject>
  85.     [Protocol, Model]
  86.     [BaseType(typeof(NSObject))]
  87.     public interface CustomizedAVSource
  88.     {
  89.         // @optional +(NSString * _Nonnull)translateURLStringToPath:(NSString * _Nonnull)urlString;
  90.         [Static]
  91.         [Export("translateURLStringToPath:")]
  92.         string TranslateURLStringToPath(string urlString);
  93.  
  94.         // @required -(NSError * _Nullable)lastError;
  95.         [Abstract]
  96.         [NullAllowed, Export("lastError")]
  97.         //[Verify(MethodToProperty)]
  98.         NSError LastError { get; }
  99.  
  100.         // @required -(BOOL)open:(NSString * _Nonnull)uri;
  101.         [Abstract]
  102.         [Export("open:")]
  103.         bool Open(string uri);
  104.  
  105.         // @required -(void)close;
  106.         [Abstract]
  107.         [Export("close")]
  108.         void Close();
  109.  
  110.         // @required -(void)abort;
  111.         [Abstract]
  112.         [Export("abort")]
  113.         void Abort();
  114.  
  115.         // @required -(unsigned long long)fileSize;
  116.         [Abstract]
  117.         [Export("fileSize")]
  118.         //[Verify(MethodToProperty)]
  119.         ulong FileSize { get; }
  120.  
  121.         // @required -(unsigned int)read:(void * _Nonnull)buffer size:(unsigned int)size;
  122.         [Abstract]
  123.         [Export("read:size:")]
  124.         unsafe uint Read(NSObject[] buffer, uint size);
  125.  
  126.         // @required -(long long)seekto:(long long)offset whence:(int)whence;
  127.         [Abstract]
  128.         [Export("seekto:whence:")]
  129.         long Seekto(long offset, int whence);
  130.     }
  131.  
  132.     // @interface CustomizedAVSourceStore : NSObject
  133.     [BaseType(typeof(NSObject))]
  134.     public interface CustomizedAVSourceStore
  135.     {
  136.         // +(instancetype _Nonnull)sharedInstance;
  137.         [Static]
  138.         [Export("sharedInstance")]
  139.         CustomizedAVSourceStore SharedInstance();
  140.  
  141.         // -(void)registerAVSourceClass:(Class _Nonnull)avsourceClass forScheme:(NSString * _Nonnull)scheme;
  142.         [Export("registerAVSourceClass:forScheme:")]
  143.         void RegisterAVSourceClass(Class avsourceClass, string scheme);
  144.  
  145.         // -(void)unregisterAVSourceClassWithScheme:(NSString * _Nonnull)scheme;
  146.         [Export("unregisterAVSourceClassWithScheme:")]
  147.         void UnregisterAVSourceClassWithScheme(string scheme);
  148.  
  149.         // -(Class _Nullable)avsourceClassForScheme:(NSString * _Nonnull)scheme;
  150.         [Export("avsourceClassForScheme:")]
  151.         [return: NullAllowed]
  152.         Class AvsourceClassForScheme(string scheme);
  153.  
  154.         // -(void)registerAVSourceURLContext:(id _Nonnull)context forURLKey:(id _Nonnull)key;
  155.         [Export("registerAVSourceURLContext:forURLKey:")]
  156.         void RegisterAVSourceURLContext(NSObject context, NSObject key);
  157.  
  158.         // -(void)unregisterAVSourceURLContextWithURLKey:(id _Nonnull)key;
  159.         [Export("unregisterAVSourceURLContextWithURLKey:")]
  160.         void UnregisterAVSourceURLContextWithURLKey(NSObject key);
  161.  
  162.         // -(id _Nullable)avsourceURLContextForURLKey:(id _Nonnull)key;
  163.         [Export("avsourceURLContextForURLKey:")]
  164.         [return: NullAllowed]
  165.         NSObject AvsourceURLContextForURLKey(NSObject key);
  166.  
  167.         // -(void)clearAllAVSourceURLContexts;
  168.         [Export("clearAllAVSourceURLContexts")]
  169.         void ClearAllAVSourceURLContexts();
  170.     }
  171.  
  172.     // @interface FFAVParser : NSObject
  173.     [BaseType(typeof(NSObject))]
  174.     public interface FFAVParser
  175.     {
  176.         // @property (readonly, nonatomic, strong) NSURL * _Nonnull url;
  177.         [Export("url", ArgumentSemantic.Strong)]
  178.         NSUrl Url { get; }
  179.  
  180.         // @property (readonly, nonatomic) NSTimeInterval duration;
  181.         [Export("duration")]
  182.         double Duration { get; }
  183.  
  184.         // @property (readonly, nonatomic) NSUInteger frameWidth;
  185.         [Export("frameWidth")]
  186.         nuint FrameWidth { get; }
  187.  
  188.         // @property (readonly, nonatomic) NSUInteger frameHeight;
  189.         [Export("frameHeight")]
  190.         nuint FrameHeight { get; }
  191.  
  192.         // +(void)showProtocols;
  193.         [Static]
  194.         [Export("showProtocols")]
  195.         void ShowProtocols();
  196.  
  197.         // +(void)showFormats;
  198.         [Static]
  199.         [Export("showFormats")]
  200.         void ShowFormats();
  201.  
  202.         // +(void)showDecoders;
  203.         [Static]
  204.         [Export("showDecoders")]
  205.         void ShowDecoders();
  206.  
  207.         // +(void)showEncoders;
  208.         [Static]
  209.         [Export("showEncoders")]
  210.         void ShowEncoders();
  211.  
  212.         // +(NSArray * _Nonnull)supportedProtocols;
  213.         [Static]
  214.         [Export("supportedProtocols")]
  215.         //[Verify(MethodToProperty), Verify(StronglyTypedNSArray)]
  216.         NSObject[] SupportedProtocols { get; }
  217.  
  218.         // -(BOOL)openMedia:(NSURL * _Nonnull)url withOptions:(NSDictionary * _Nullable)options;
  219.         [Export("openMedia:withOptions:")]
  220.         bool OpenMedia(NSUrl url, [NullAllowed] NSDictionary options);
  221.  
  222.         // -(BOOL)hasDolby;
  223.         [Export("hasDolby")]
  224.         //[Verify(MethodToProperty)]
  225.         bool HasDolby { get; }
  226.  
  227.         // -(BOOL)hasAudio;
  228.         [Export("hasAudio")]
  229.         //[Verify(MethodToProperty)]
  230.         bool HasAudio { get; }
  231.  
  232.         // -(BOOL)hasVideo;
  233.         [Export("hasVideo")]
  234.         //[Verify(MethodToProperty)]
  235.         bool HasVideo { get; }
  236.  
  237.         // -(UIImage * _Nullable)thumbnailAtTime:(NSTimeInterval)seconds;
  238.         [Export("thumbnailAtTime:")]
  239.         [return: NullAllowed]
  240.         UIImage ThumbnailAtTime(double seconds);
  241.     }
  242.  
  243.     // @interface FFAVPlayerController : NSObject
  244.     [BaseType(typeof(NSObject))]
  245.     public interface FFAVPlayerController
  246.     {
  247.         // @property (readonly, nonatomic) NSURL * _Nonnull mediaURL;
  248.         [Export("mediaURL")]
  249.         NSUrl MediaURL { get; }
  250.  
  251.         // @property (nonatomic, weak) id<FFAVPlayerControllerDelegate> _Nullable delegate;
  252.         [NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
  253.         NSObject WeakDelegate { get; set; }
  254.  
  255.         // @property (assign, nonatomic) BOOL allowBackgroundPlayback;
  256.         [Export("allowBackgroundPlayback")]
  257.         bool AllowBackgroundPlayback { get; set; }
  258.  
  259.         // @property (assign, nonatomic) float videoAspectRatio;
  260.         [Export("videoAspectRatio")]
  261.         float VideoAspectRatio { get; set; }
  262.  
  263.         // @property (assign, nonatomic) BOOL shouldAutoPlay;
  264.         [Export("shouldAutoPlay")]
  265.         bool ShouldAutoPlay { get; set; }
  266.  
  267.         // @property (assign, nonatomic) AVStreamDiscardOption streamDiscardOption;
  268.         [Export("streamDiscardOption", ArgumentSemantic.Assign)]
  269.         AVStreamDiscardOption StreamDiscardOption { get; set; }
  270.  
  271.         // @property (getter = isMuted, assign, nonatomic) BOOL muted;
  272.         [Export("muted")]
  273.         bool Muted { [Bind("isMuted")] get; set; }
  274.  
  275.         // @property (readonly, nonatomic) NSInteger currentAudioTrack;
  276.         [Export("currentAudioTrack")]
  277.         nint CurrentAudioTrack { get; }
  278.  
  279.         // @property (readonly, nonatomic, strong) NSArray * _Nullable audioTracks;
  280.         [NullAllowed, Export("audioTracks", ArgumentSemantic.Strong)]
  281.         //[Verify(StronglyTypedNSArray)]
  282.         NSObject[] AudioTracks { get; }
  283.  
  284.         // @property (assign, nonatomic) NSTimeInterval throttleCurrentPlaybackTimeChangeNotification;
  285.         [Export("throttleCurrentPlaybackTimeChangeNotification")]
  286.         double ThrottleCurrentPlaybackTimeChangeNotification { get; set; }
  287.  
  288.         // @property (nonatomic) unsigned long long minPlayableBufferSize;
  289.         [Export("minPlayableBufferSize")]
  290.         ulong MinPlayableBufferSize { get; set; }
  291.  
  292.         // @property (readonly, nonatomic) long long avBitrate;
  293.         [Export("avBitrate")]
  294.         long AvBitrate { get; }
  295.  
  296.         // @property (readonly, nonatomic) NSInteger avFramerate;
  297.         [Export("avFramerate")]
  298.         nint AvFramerate { get; }
  299.  
  300.         // @property (assign, nonatomic) float contrast;
  301.         [Export("contrast")]
  302.         float Contrast { get; set; }
  303.  
  304.         // @property (assign, nonatomic) float saturation;
  305.         [Export("saturation")]
  306.         float Saturation { get; set; }
  307.  
  308.         // @property (assign, nonatomic) float brightness;
  309.         [Export("brightness")]
  310.         float Brightness { get; set; }
  311.  
  312.         // @property (assign, nonatomic) AVDecodingMode decodingMode;
  313.         [Export("decodingMode", ArgumentSemantic.Assign)]
  314.         AVDecodingMode DecodingMode { get; set; }
  315.  
  316.         // @property (readonly, nonatomic) BOOL canApplyHWDecoder;
  317.         [Export("canApplyHWDecoder")]
  318.         bool CanApplyHWDecoder { get; }
  319.  
  320.         // @property (assign, nonatomic) AVSyncMode syncMode;
  321.         [Export("syncMode", ArgumentSemantic.Assign)]
  322.         AVSyncMode SyncMode { get; set; }
  323.  
  324.         // +(NSString * _Nonnull)convertISO639LanguageCodeToEnName:(NSString * _Nonnull)langCode;
  325.         [Static]
  326.         [Export("convertISO639LanguageCodeToEnName:")]
  327.         string ConvertISO639LanguageCodeToEnName(string langCode);
  328.  
  329.         // +(NSString * _Nonnull)formatTimeInterval:(NSTimeInterval)seconds isLeft:(BOOL)isLeft;
  330.         [Static]
  331.         [Export("formatTimeInterval:isLeft:")]
  332.         string FormatTimeInterval(double seconds, bool isLeft);
  333.  
  334.         // -(BOOL)openMedia:(NSURL * _Nonnull)url withOptions:(NSDictionary * _Nullable)options;
  335.         [Export("openMedia:withOptions:")]
  336.         bool OpenMedia(NSUrl url, [NullAllowed] NSDictionary options);
  337.  
  338.         // -(UIView * _Nullable)drawableView;
  339.         [NullAllowed, Export("drawableView")]
  340.         //[Verify(MethodToProperty)]
  341.         UIView DrawableView { get; }
  342.  
  343.         // -(void)fullScreen:(BOOL)enter;
  344.         [Export("fullScreen:")]
  345.         void FullScreen(bool enter);
  346.  
  347.         // -(BOOL)isFullscreen;
  348.         [Export("isFullscreen")]
  349.         //[Verify(MethodToProperty)]
  350.         bool IsFullscreen { get; }
  351.  
  352.         // -(BOOL)hasDolby;
  353.         [Export("hasDolby")]
  354.         //[Verify(MethodToProperty)]
  355.         bool HasDolby { get; }
  356.  
  357.         // -(BOOL)hasAudio;
  358.         [Export("hasAudio")]
  359.         //[Verify(MethodToProperty)]
  360.         bool HasAudio { get; }
  361.  
  362.         // -(BOOL)hasVideo;
  363.         [Export("hasVideo")]
  364.         //[Verify(MethodToProperty)]
  365.         bool HasVideo { get; }
  366.  
  367.         // -(void)switchAudioTracker:(int)index;
  368.         [Export("switchAudioTracker:")]
  369.         void SwitchAudioTracker(int index);
  370.  
  371.         // -(CGSize)videoFrameSize;
  372.         [Export("videoFrameSize")]
  373.         //[Verify(MethodToProperty)]
  374.         CGSize VideoFrameSize { get; }
  375.  
  376.         // -(AVPlayerState)playerState;
  377.         [Export("playerState")]
  378.         //[Verify(MethodToProperty)]
  379.         AVPlayerState PlayerState { get; }
  380.  
  381.         // -(NSTimeInterval)duration;
  382.         [Export("duration")]
  383.         //[Verify(MethodToProperty)]
  384.         double Duration { get; }
  385.  
  386.         // -(NSTimeInterval)currentPlaybackTime;
  387.         [Export("currentPlaybackTime")]
  388.         //[Verify(MethodToProperty)]
  389.         double CurrentPlaybackTime { get; }
  390.  
  391.         // -(BOOL)play:(NSTimeInterval)ti;
  392.         [Export("play:")]
  393.         bool Play(double ti);
  394.  
  395.         // -(void)pause;
  396.         [Export("pause")]
  397.         void Pause();
  398.  
  399.         // -(void)resume;
  400.         [Export("resume")]
  401.         void Resume();
  402.  
  403.         // -(void)stop;
  404.         [Export("stop")]
  405.         void Stop();
  406.  
  407.         // -(void)seekto:(NSTimeInterval)ti;
  408.         [Export("seekto:")]
  409.         void Seekto(double ti);
  410.  
  411.         // -(void)enableTrackFramerate:(BOOL)enable;
  412.         [Export("enableTrackFramerate:")]
  413.         void EnableTrackFramerate(bool enable);
  414.  
  415.         // -(int)realtimeFramerate;
  416.         [Export("realtimeFramerate")]
  417.         //[Verify(MethodToProperty)]
  418.         int RealtimeFramerate { get; }
  419.  
  420.         // -(void)enableTrackBitrate:(BOOL)enable;
  421.         [Export("enableTrackBitrate:")]
  422.         void EnableTrackBitrate(bool enable);
  423.  
  424.         // -(int)realtimeBitrate;
  425.         [Export("realtimeBitrate")]
  426.         //[Verify(MethodToProperty)]
  427.         int RealtimeBitrate { get; }
  428.  
  429.         // -(int)bufferingProgress;
  430.         [Export("bufferingProgress")]
  431.         //[Verify(MethodToProperty)]
  432.         int BufferingProgress { get; }
  433.  
  434.         // -(float)playbackSpeed;
  435.         // -(void)setPlaybackSpeed:(float)speed;
  436.         [Export("playbackSpeed")]
  437.         //[Verify(MethodToProperty)]
  438.         float PlaybackSpeed { get; set; }
  439.  
  440.         // +(float)currentVolume;
  441.         [Static]
  442.         [Export("currentVolume")]
  443.         //[Verify(MethodToProperty)]
  444.         float CurrentVolume { get; }
  445.  
  446.         // +(void)setVolume:(float)fact;
  447.         [Static]
  448.         [Export("setVolume:")]
  449.         void SetVolume(float fact);
  450.  
  451.         // -(void)beganInterruption;
  452.         [Export("beganInterruption")]
  453.         void BeganInterruption();
  454.  
  455.         // -(void)endedInterruption;
  456.         [Export("endedInterruption")]
  457.         void EndedInterruption();
  458.     }
  459.  
  460.     // @protocol FFAVPlayerControllerDelegate
  461.     [Protocol, Model]
  462.     public interface FFAVPlayerControllerDelegate
  463.     {
  464.         // @optional -(void)FFAVPlayerControllerWillLoad:(FFAVPlayerController * _Nonnull)controller;
  465.         [Export("FFAVPlayerControllerWillLoad:")]
  466.         void FFAVPlayerControllerWillLoad(FFAVPlayerController controller);
  467.  
  468.         // @optional -(void)FFAVPlayerControllerDidLoad:(FFAVPlayerController * _Nonnull)controller error:(NSError * _Nullable)error;
  469.         [Export("FFAVPlayerControllerDidLoad:error:")]
  470.         void FFAVPlayerControllerDidLoad(FFAVPlayerController controller, [NullAllowed] NSError error);
  471.  
  472.         // @optional -(void)FFAVPlayerControllerDidStateChange:(FFAVPlayerController * _Nonnull)controller;
  473.         [Export("FFAVPlayerControllerDidStateChange:")]
  474.         void FFAVPlayerControllerDidStateChange(FFAVPlayerController controller);
  475.  
  476.         // @optional -(void)FFAVPlayerControllerDidCurTimeChange:(FFAVPlayerController * _Nonnull)controller position:(NSTimeInterval)position;
  477.         [Export("FFAVPlayerControllerDidCurTimeChange:position:")]
  478.         void FFAVPlayerControllerDidCurTimeChange(FFAVPlayerController controller, double position);
  479.  
  480.         // @optional -(void)FFAVPlayerControllerDidBufferingProgressChange:(FFAVPlayerController * _Nonnull)controller progress:(double)progress;
  481.         [Export("FFAVPlayerControllerDidBufferingProgressChange:progress:")]
  482.         void FFAVPlayerControllerDidBufferingProgressChange(FFAVPlayerController controller, double progress);
  483.  
  484.         // @optional -(void)FFAVPlayerControllerDidBitrateChange:(FFAVPlayerController * _Nonnull)controller bitrate:(NSInteger)bitrate;
  485.         [Export("FFAVPlayerControllerDidBitrateChange:bitrate:")]
  486.         void FFAVPlayerControllerDidBitrateChange(FFAVPlayerController controller, nint bitrate);
  487.  
  488.         // @optional -(void)FFAVPlayerControllerDidFramerateChange:(FFAVPlayerController * _Nonnull)controller framerate:(NSInteger)framerate;
  489.         [Export("FFAVPlayerControllerDidFramerateChange:framerate:")]
  490.         void FFAVPlayerControllerDidFramerateChange(FFAVPlayerController controller, nint framerate);
  491.  
  492.         // @optional -(void)FFAVPlayerControllerDidEnterFullscreenMode:(FFAVPlayerController * _Nonnull)controller;
  493.         [Export("FFAVPlayerControllerDidEnterFullscreenMode:")]
  494.         void FFAVPlayerControllerDidEnterFullscreenMode(FFAVPlayerController controller);
  495.  
  496.         // @optional -(void)FFAVPlayerControllerDidExitFullscreenMode:(FFAVPlayerController * _Nonnull)controller;
  497.         [Export("FFAVPlayerControllerDidExitFullscreenMode:")]
  498.         void FFAVPlayerControllerDidExitFullscreenMode(FFAVPlayerController controller);
  499.  
  500.         // @optional -(void)FFAVPlayerControllerDidOccurError:(FFAVPlayerController * _Nonnull)controller error:(NSError * _Nonnull)error;
  501.         [Export("FFAVPlayerControllerDidOccurError:error:")]
  502.         void FFAVPlayerControllerDidOccurError(FFAVPlayerController controller, NSError error);
  503.     }
  504.  
  505.     // @interface NativeAVPlayerController : NSObject
  506.     [BaseType(typeof(NSObject))]
  507.     public interface NativeAVPlayerController
  508.     {
  509.         // @property (nonatomic, weak) id<NativeAVPlayerControllerDelegate> _Nullable delegate;
  510.         [NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
  511.         NSObject WeakDelegate { get; set; }
  512.  
  513.         // @property (readonly, retain, nonatomic) NSURL * _Nonnull mediaURL;
  514.         [Export("mediaURL", ArgumentSemantic.Retain)]
  515.         NSUrl MediaURL { get; }
  516.  
  517.         // @property (assign, nonatomic) BOOL allowsExternalPlayback;
  518.         [Export("allowsExternalPlayback")]
  519.         bool AllowsExternalPlayback { get; set; }
  520.  
  521.         // @property (assign, nonatomic) BOOL shouldAutoPlay;
  522.         [Export("shouldAutoPlay")]
  523.         bool ShouldAutoPlay { get; set; }
  524.  
  525.         // @property (assign, nonatomic) BOOL allowBackgroundPlayback;
  526.         [Export("allowBackgroundPlayback")]
  527.         bool AllowBackgroundPlayback { get; set; }
  528.  
  529.         // @property (assign, nonatomic) BOOL fullScreenMode;
  530.         [Export("fullScreenMode")]
  531.         bool FullScreenMode { get; set; }
  532.  
  533.         // @property (assign, nonatomic) float rateOfPlayback;
  534.         [Export("rateOfPlayback")]
  535.         float RateOfPlayback { get; set; }
  536.  
  537.         // @property (assign, nonatomic) NSTimeInterval currentPlaybackTime;
  538.         [Export("currentPlaybackTime")]
  539.         double CurrentPlaybackTime { get; set; }
  540.  
  541.         // @property (assign, nonatomic) BOOL enableTimeObserver;
  542.         [Export("enableTimeObserver")]
  543.         bool EnableTimeObserver { get; set; }
  544.  
  545.         // @property (getter = isMuted, assign, nonatomic) BOOL muted;
  546.         [Export("muted")]
  547.         bool Muted { [Bind("isMuted")] get; set; }
  548.  
  549.         // @property (readonly, retain, nonatomic) UIView * _Nullable drawableView;
  550.         [NullAllowed, Export("drawableView", ArgumentSemantic.Retain)]
  551.         UIView DrawableView { get; }
  552.  
  553.         // @property (readonly, retain, nonatomic) NSString * _Nullable title;
  554.         [NullAllowed, Export("title", ArgumentSemantic.Retain)]
  555.         string Title { get; }
  556.  
  557.         // @property (readonly, nonatomic) NSTimeInterval duration;
  558.         [Export("duration")]
  559.         double Duration { get; }
  560.  
  561.         // @property (readonly, nonatomic) CGSize videoFrameSize;
  562.         [Export("videoFrameSize")]
  563.         CGSize VideoFrameSize { get; }
  564.  
  565.         // @property (readonly, nonatomic) BOOL isPlaying;
  566.         [Export("isPlaying")]
  567.         bool IsPlaying { get; }
  568.  
  569.         // @property (readonly, assign, nonatomic) BOOL externalPlaybackActive;
  570.         [Export("externalPlaybackActive")]
  571.         bool ExternalPlaybackActive { get; }
  572.  
  573.         // @property (readonly, nonatomic) BOOL hasVideo;
  574.         [Export("hasVideo")]
  575.         bool HasVideo { get; }
  576.  
  577.         // @property (readonly, nonatomic) BOOL hasAudio;
  578.         [Export("hasAudio")]
  579.         bool HasAudio { get; }
  580.  
  581.         // @property (readonly, nonatomic) NSInteger currentAudioTrack;
  582.         [Export("currentAudioTrack")]
  583.         nint CurrentAudioTrack { get; }
  584.  
  585.         // @property (readonly, nonatomic) NSArray * _Nullable audioTracks;
  586.         [NullAllowed, Export("audioTracks")]
  587.         //[Verify(StronglyTypedNSArray)]
  588.         NSObject[] AudioTracks { get; }
  589.  
  590.         // -(BOOL)openMedia:(NSURL * _Nonnull)url options:(NSDictionary * _Nullable)options;
  591.         [Export("openMedia:options:")]
  592.         bool OpenMedia(NSUrl url, [NullAllowed] NSDictionary options);
  593.  
  594.         // -(void)play;
  595.         [Export("play")]
  596.         void Play();
  597.  
  598.         // -(void)pause;
  599.         [Export("pause")]
  600.         void Pause();
  601.  
  602.         // -(void)stop;
  603.         [Export("stop")]
  604.         void Stop();
  605.  
  606.         // -(void)switchAudioTracker:(int)index;
  607.         [Export("switchAudioTracker:")]
  608.         void SwitchAudioTracker(int index);
  609.     }
  610.  
  611.     // @protocol NativeAVPlayerControllerDelegate
  612.     [Protocol, Model]
  613.     public interface NativeAVPlayerControllerDelegate
  614.     {
  615.         // @optional -(void)NativeAVPlayerControllerWillLoad:(NativeAVPlayerController * _Nonnull)controller;
  616.         [Export("NativeAVPlayerControllerWillLoad:")]
  617.         void NativeAVPlayerControllerWillLoad(NativeAVPlayerController controller);
  618.  
  619.         // @optional -(void)NativeAVPlayerControllerDidLoad:(NativeAVPlayerController * _Nonnull)controller;
  620.         [Export("NativeAVPlayerControllerDidLoad:")]
  621.         void NativeAVPlayerControllerDidLoad(NativeAVPlayerController controller);
  622.  
  623.         // @optional -(void)NativeAVPlayerControllerDidStateChange:(NativeAVPlayerController * _Nonnull)controller;
  624.         [Export("NativeAVPlayerControllerDidStateChange:")]
  625.         void NativeAVPlayerControllerDidStateChange(NativeAVPlayerController controller);
  626.  
  627.         // @optional -(void)NativeAVPlayerControllerBeginBuffering:(NativeAVPlayerController * _Nonnull)controller;
  628.         [Export("NativeAVPlayerControllerBeginBuffering:")]
  629.         void NativeAVPlayerControllerBeginBuffering(NativeAVPlayerController controller);
  630.  
  631.         // @optional -(void)NativeAVPlayerControllerEndBuffering:(NativeAVPlayerController * _Nonnull)controller;
  632.         [Export("NativeAVPlayerControllerEndBuffering:")]
  633.         void NativeAVPlayerControllerEndBuffering(NativeAVPlayerController controller);
  634.  
  635.         // @optional -(void)NativeAVPlayerControllerDidCurTimeChange:(NativeAVPlayerController * _Nonnull)controller position:(NSTimeInterval)position;
  636.         [Export("NativeAVPlayerControllerDidCurTimeChange:position:")]
  637.         void NativeAVPlayerControllerDidCurTimeChange(NativeAVPlayerController controller, double position);
  638.  
  639.         // @optional -(void)NativeAVPlayerControllerDidFinishPlayback:(NativeAVPlayerController * _Nonnull)controller;
  640.         [Export("NativeAVPlayerControllerDidFinishPlayback:")]
  641.         void NativeAVPlayerControllerDidFinishPlayback(NativeAVPlayerController controller);
  642.  
  643.         // @optional -(void)NativeAVPlayerController:(NativeAVPlayerController * _Nonnull)controller didOccurError:(NSError * _Nonnull)error;
  644.         [Export("NativeAVPlayerController:didOccurError:")]
  645.         void NativeAVPlayerController(NativeAVPlayerController controller, NSError error);
  646.  
  647.         // @optional -(void)NativeAVPlayerControllerDidEnterFullScreenMode:(NativeAVPlayerController * _Nonnull)controller;
  648.         [Export("NativeAVPlayerControllerDidEnterFullScreenMode:")]
  649.         void NativeAVPlayerControllerDidEnterFullScreenMode(NativeAVPlayerController controller);
  650.  
  651.         // @optional -(void)NativeAVPlayerControllerDidExitFullScreenMode:(NativeAVPlayerController * _Nonnull)controller;
  652.         [Export("NativeAVPlayerControllerDidExitFullScreenMode:")]
  653.         void NativeAVPlayerControllerDidExitFullScreenMode(NativeAVPlayerController controller);
  654.  
  655.         // @optional -(BOOL)NativeAVPlayerController:(NativeAVPlayerController * _Nonnull)controller shouldWaitForResponseToAuthenticationChallenge:(NSURLAuthenticationChallenge * _Nonnull)authenticationChallenge;
  656.         [Export("NativeAVPlayerController:shouldWaitForResponseToAuthenticationChallenge:")]
  657.         bool NativeAVPlayerController(NativeAVPlayerController controller, NSUrlAuthenticationChallenge authenticationChallenge);
  658.     }
  659.  
  660.     // @interface OneAudioPlayer : NSObject
  661.     [BaseType(typeof(NSObject))]
  662.     public interface OneAudioPlayer
  663.     {
  664.         // @property (nonatomic, weak) NSObject<OneAudioPlayerDelegate> * _Nullable delegate;
  665.         [NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
  666.         NSObject WeakDelegate { get; set; }
  667.  
  668.         // @property (nonatomic) BOOL enableUniversalMode;
  669.         [Export("enableUniversalMode")]
  670.         bool EnableUniversalMode { get; set; }
  671.  
  672.         // @property (assign, nonatomic) BOOL shouldAutoPlay;
  673.         [Export("shouldAutoPlay")]
  674.         bool ShouldAutoPlay { get; set; }
  675.  
  676.         // @property (readonly, nonatomic, strong) NSURL * _Nonnull mediaURL;
  677.         [Export("mediaURL", ArgumentSemantic.Strong)]
  678.         NSUrl MediaURL { get; }
  679.  
  680.         // @property (readonly, nonatomic) BOOL isiOSNativeFormat;
  681.         [Export("isiOSNativeFormat")]
  682.         bool IsiOSNativeFormat { get; }
  683.  
  684.         // @property (readonly, nonatomic) BOOL isLoaded;
  685.         [Export("isLoaded")]
  686.         bool IsLoaded { get; }
  687.  
  688.         // @property (readonly, nonatomic) BOOL isPlaying;
  689.         [Export("isPlaying")]
  690.         bool IsPlaying { get; }
  691.  
  692.         // @property (readonly, nonatomic) NSTimeInterval duration;
  693.         [Export("duration")]
  694.         double Duration { get; }
  695.  
  696.         // @property (nonatomic) NSTimeInterval currentPlaybackTime;
  697.         [Export("currentPlaybackTime")]
  698.         double CurrentPlaybackTime { get; set; }
  699.  
  700.         // @property (nonatomic) unsigned long long minPlayableBufferSize;
  701.         [Export("minPlayableBufferSize")]
  702.         ulong MinPlayableBufferSize { get; set; }
  703.  
  704.         // -(void)openMediaAtURL:(NSURL * _Nonnull)url isiOSNativeFormat:(BOOL)isiOSNativeFormat options:(NSDictionary * _Nullable)options;
  705.         [Export("openMediaAtURL:isiOSNativeFormat:options:")]
  706.         void OpenMediaAtURL(NSUrl url, bool isiOSNativeFormat, [NullAllowed] NSDictionary options);
  707.  
  708.         // -(void)play:(NSTimeInterval)position;
  709.         [Export("play:")]
  710.         void Play(double position);
  711.  
  712.         // -(void)resume;
  713.         [Export("resume")]
  714.         void Resume();
  715.  
  716.         // -(void)pause;
  717.         [Export("pause")]
  718.         void Pause();
  719.  
  720.         // -(void)beganInterruption;
  721.         [Export("beganInterruption")]
  722.         void BeganInterruption();
  723.  
  724.         // -(void)endedInterruption;
  725.         [Export("endedInterruption")]
  726.         void EndedInterruption();
  727.     }
  728.  
  729.     // @protocol OneAudioPlayerDelegate
  730.     [Protocol, Model]
  731.     public interface OneAudioPlayerDelegate
  732.     {
  733.         // @optional -(void)OneAudioPlayerWillLoad:(OneAudioPlayer * _Nonnull)player;
  734.         [Export("OneAudioPlayerWillLoad:")]
  735.         void OneAudioPlayerWillLoad(OneAudioPlayer player);
  736.  
  737.         // @optional -(void)OneAudioPlayerDidLoad:(OneAudioPlayer * _Nonnull)player;
  738.         [Export("OneAudioPlayerDidLoad:")]
  739.         void OneAudioPlayerDidLoad(OneAudioPlayer player);
  740.  
  741.         // @optional -(void)OneAudioPlayerDidStateChange:(OneAudioPlayer * _Nonnull)player;
  742.         [Export("OneAudioPlayerDidStateChange:")]
  743.         void OneAudioPlayerDidStateChange(OneAudioPlayer player);
  744.  
  745.         // @optional -(void)OneAudioPlayer:(OneAudioPlayer * _Nonnull)player currentTimeChanged:(NSTimeInterval)currentTime;
  746.         [Export("OneAudioPlayer:currentTimeChanged:")]
  747.         void OneAudioPlayer(OneAudioPlayer player, double currentTime);
  748.  
  749.         // @optional -(void)OneAudioPlayerDidFinishPlayback:(OneAudioPlayer * _Nonnull)player;
  750.         [Export("OneAudioPlayerDidFinishPlayback:")]
  751.         void OneAudioPlayerDidFinishPlayback(OneAudioPlayer player);
  752.  
  753.         // @optional -(void)OneAudioPlayer:(OneAudioPlayer * _Nonnull)player occuredError:(NSError * _Nonnull)error;
  754.         [Export("OneAudioPlayer:occuredError:")]
  755.         void OneAudioPlayer(OneAudioPlayer player, NSError error);
  756.  
  757.         // @optional -(BOOL)OneAudioPlayer:(OneAudioPlayer * _Nonnull)player shouldWaitForResponseToAuthenticationChallenge:(NSURLAuthenticationChallenge * _Nonnull)authenticationChallenge;
  758.         [Export("OneAudioPlayer:shouldWaitForResponseToAuthenticationChallenge:")]
  759.         bool OneAudioPlayer(OneAudioPlayer player, NSUrlAuthenticationChallenge authenticationChallenge);
  760.     }
  761. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top