- internal static readonly int VIDEO = Interop.VideoView.VideoView_Property_VIDEO_get();
- internal static readonly int LOOPING = Interop.VideoView.VideoView_Property_LOOPING_get();
- internal static readonly int MUTED = Interop.VideoView.VideoView_Property_MUTED_get();
- internal static readonly int VOLUME = Interop.VideoView.VideoView_Property_VOLUME_get();
- internal static readonly int UNDERLAY = Interop.VideoView.VideoView_Property_UNDERLAY_get();
+ internal static readonly int VIDEO = Interop.VideoView.VideoGet();
+ internal static readonly int LOOPING = Interop.VideoView.LoopingGet();
+ internal static readonly int MUTED = Interop.VideoView.MutedGet();
+ internal static readonly int VOLUME = Interop.VideoView.VolumeGet();
+ internal static readonly int UNDERLAY = Interop.VideoView.UnderlayGet();
+ }
+
+ internal System.IntPtr GetNativePlayerHandle()
+ {
+ var ret = Interop.VideoView.GetNativePlayerHandle(SwigCPtr);
+ NUILog.Debug($"NativePlayerHandle=0x{ret:X}");
+ return ret;
+ }
+ }
+
+ /// <summary>
+ /// Contains and encapsulates Native Player handle.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This has been deprecated in API9 and will be removed in API11. Use VideoView.NativeHandle instead.")]
+ public class SafeNativePlayerHandle : SafeHandle
+ {
+ /// <summary>
+ /// Constructor, null handle is set.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SafeNativePlayerHandle() : base(global::System.IntPtr.Zero, false)
+ {
+ }
+
+ /// <summary>
+ /// Constructor, Native player handle is set to handle.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SafeNativePlayerHandle(VideoView videoView) : base(global::System.IntPtr.Zero, false)
+ {
+ if (videoView != null)
+ {
+ SetHandle(videoView.GetNativePlayerHandle());
+ }
+ }
+
+ /// <summary>
+ /// Null check if the handle is valid or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool IsInvalid
+ {
+ get
+ {
+ return handle == global::System.IntPtr.Zero;
+ }
+ }
+ /// <summary>
+ /// Release handle itself.
+ /// </summary>
+ /// <returns>true when released successfully.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool ReleaseHandle()
+ {
+ SetHandle(global::System.IntPtr.Zero);
+ return true;