示例#1
0
        /// <summary>
        /// Gets the streaming download progress.
        /// </summary>
        /// <returns>The <see cref="DownloadProgress"/> containing current download progress.</returns>
        /// <remarks>The player must be in the <see cref="PlayerState.Playing"/> or <see cref="PlayerState.Paused"/> state.</remarks>
        /// <exception cref="InvalidOperationException">
        ///     The player is not streaming.<br/>
        ///     -or-<br/>
        ///     The player is not in the valid state.
        ///     </exception>
        /// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
        /// <since_tizen> 3 </since_tizen>
        public DownloadProgress GetDownloadProgress()
        {
            ValidatePlayerState(PlayerState.Playing, PlayerState.Paused);

            int start   = 0;
            int current = 0;

            NativePlayer.GetStreamingDownloadProgress(Handle, out start, out current).
            ThrowIfFailed(this, "Failed to get download progress");

            Log.Info(PlayerLog.Tag, "get download progress : " + start + ", " + current);

            return(new DownloadProgress(start, current));
        }