[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
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<HTMLMediaElement*>(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);