From: eojin.ham Date: Tue, 16 Jul 2013 11:40:15 +0000 (+0900) Subject: Fix the issue that audio is not played after resuming. X-Git-Tag: 2.2_release~40 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fweb%2Fwebkit-efl.git;a=commitdiff_plain;h=00999621743928894cc34d330270ee6e500186b2 Fix the issue that audio is not played after resuming. [Title] Fix the issue that audio is not played after resuming. [Problem] N_SE_46100 After 'DeviceMotionCapture' app is resumed, sound effect is not played. [Cause] Seeking to end position when resuming. [Solution] Fix not to seek end of position when the media already reach end of file. Change-Id: I9b7741f0bcfce7e31351ef11602bfb7f16757aa7 --- diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index e8a601e..07f6508 100755 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -1097,8 +1097,9 @@ gboolean MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data()); #if ENABLE(TIZEN_GSTREAMER_VIDEO) - if (m_suspendTime > 0 && newState == GST_STATE_PAUSED) { - if (!isLocalMediaStream()) + HTMLMediaElement* element = static_cast(player()->mediaPlayerClient()); + if (element->suspended() && newState == GST_STATE_PAUSED) { + if (m_suspendTime > 0 && !(isLocalMediaStream() || m_isEndReached)) seek(m_suspendTime); m_suspendTime = 0; m_player->mediaPlayerClient()->setSuspended(false);