From 84ec513e2851a5223334085b833733ec3c2bff3a Mon Sep 17 00:00:00 2001 From: nam <36914158+kqjy777@users.noreply.github.com> Date: Wed, 1 Aug 2018 13:54:36 +0900 Subject: [PATCH] [MediaPlayer] modify the precondition of Start method (#359) * [MediaPlayer] modify the precondition of Start method * fix wrong description * devide paragraph --- .../Player/Player.Properties.cs | 2 +- src/Tizen.Multimedia.MediaPlayer/Player/Player.cs | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs index 00b5927..9ec8ac6 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs @@ -35,7 +35,7 @@ namespace Tizen.Multimedia /// /// A duration of buffering data that must be prerolled to start playback. /// A duration of buffering data that must be prerolled to resume playback - /// if player enters pause state for buffering. + /// if player is paused for buffering internally. /// 5 public PlayerBufferingTime(int preBufferMillisecond, int reBufferMillisecond) { diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs index 06c6165..3390ed9 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs @@ -380,10 +380,15 @@ namespace Tizen.Multimedia /// Starts or resumes playback. /// /// - /// The player must be in the or state. - /// It has no effect if the player is already in the state.
- ///
- /// Sound can be mixed with other sounds if you don't control the stream focus using . + /// Sound can be mixed with other sounds if you don't control the stream focus using .
+ /// Before Tizen 5.0, The player must be in the or state. + /// It has no effect if the player is already in the state. + /// Since Tizen 5.0, The player must be in the , , + /// or state.
+ /// In case of HTTP streaming playback, the player could be internally paused for buffering. + /// If the application calls this function during the buffering, the playback will be resumed by force + /// and the buffering message posting by will be stopped.
+ /// In other cases, the player will keep playing without returning error.
///
/// The player has already been disposed of. /// The player is not in the valid state. @@ -392,15 +397,11 @@ namespace Tizen.Multimedia /// /// /// + /// /// 3 public virtual void Start() { - if (State == PlayerState.Playing) - { - Log.Warn(PlayerLog.Tag, "playing state already"); - return; - } - ValidatePlayerState(PlayerState.Ready, PlayerState.Paused); + ValidatePlayerState(PlayerState.Ready, PlayerState.Paused, PlayerState.Playing); NativePlayer.Start(Handle).ThrowIfFailed(this, "Failed to start the player"); } -- 2.7.4