Example #1
0
        /// <summary>
        /// Gets the play position in milliseconds.
        /// </summary>
        /// <remarks>The player must be in the <see cref="PlayerState.Ready"/>, <see cref="PlayerState.Playing"/>,
        /// or <see cref="PlayerState.Paused"/> state.</remarks>
        /// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
        /// <exception cref="InvalidOperationException">The player is not in the valid state.</exception>
        /// <seealso cref="SetPlayPositionAsync(int, bool)"/>
        /// <since_tizen> 3 </since_tizen>
        public int GetPlayPosition()
        {
            ValidatePlayerState(PlayerState.Ready, PlayerState.Paused, PlayerState.Playing);

            int playPosition = 0;

            NativePlayer.GetPlayPosition(Handle, out playPosition).
            ThrowIfFailed(this, "Failed to get the play position of the player");

            Log.Info(PlayerLog.Tag, "get play position : " + playPosition);

            return(playPosition);
        }