private Display _display;
+ private bool _uiSync;
+
private PlayerErrorCode SetDisplay(Display display)
{
if (display == null)
/// <remarks>
/// The player must be in the <see cref="PlayerState.Idle"/> state.<br/>
/// The raw video feature(http://tizen.org/feature/multimedia.raw_video) is required if
- /// the display is created with <see cref="MediaView"/>.
+ /// the display is created with <see cref="MediaView"/>.<br/>
+ /// If user want to use video and UI sync mode, please use <see cref="Tizen.Multimedia.Display(NUI.Window, bool)"/>.(Since tizen 6.5)<br/>
+ /// But in UI sync mode, please note that <see cref="Tizen.Multimedia.Player.DisplaySettings"/> is not supported.
/// </remarks>
/// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
/// <exception cref="ArgumentException">The value has already been assigned to another player.</exception>
throw new ArgumentException("The display has already been assigned to another.");
}
+ _uiSync = value.UiSync;
+
SetDisplay(value).ThrowIfFailed(this, "Failed to configure display of the player");
ReplaceDisplay(value);
{
Debug.Assert(IsDisposed == false);
- return NativeDisplay.SetEcoreDisplay(Handle, PlayerDisplayType.Overlay, windowHandle);
+ return NativeDisplay.SetEcoreDisplay(Handle,
+ _uiSync ? PlayerDisplayType.OverlayUISync : PlayerDisplayType.Overlay, windowHandle);
}
#endregion
/// </remarks>
/// <since_tizen> 3 </since_tizen>
public Display(NUI.Window window)
+ : this (window, false)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Display"/> class with a <see cref="NUI.Window"/> class.
+ /// </summary>
+ /// <param name="window">A <see cref="NUI.Window"/> to display.</param>
+ /// <param name="uiSync">A value indicates whether video and UI is in sync or not.</param>
+ /// <remarks>
+ /// The <see cref="NUI.Window.BackgroundColor"/> must be <see cref="NUI.Color.Transparent"/>
+ /// for the <see cref="Display"/> to be rendered correctly.<br/>
+ /// UI sync is only for <see cref="T:Tizen.Multimedia.Player"/> and
+ /// <see cref="T:Tizen.Multimedia.Player.DisplaySettings"/> will not work in UI sync mode.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
+ public Display(NUI.Window window, bool uiSync)
{
if (window == null)
{
}
_setter = new EcoreDisplaySetter(window.GetNativeWindowHandler());
+
+ UiSync = uiSync;
}
private EvasObject EvasObject { get; }
internal bool HasMediaView { get; } = false;
+ internal bool UiSync { get; } = false;
+
internal object Owner => _owner;
internal void SetOwner(object newOwner)