Audio is stopped, but shows playing icon when call ended.
authorkeonho07.kim <keonho07.kim@samsung.com>
Wed, 29 May 2013 12:35:17 +0000 (21:35 +0900)
committerGerrit Code Review <gerrit2@kim11>
Fri, 31 May 2013 04:27:54 +0000 (13:27 +0900)
[Title] Audio is stopped, but shows playing icon when call ended.
[Issue#] N_SE-37832
[Problem] Play/Pause icon is not matched during a call.
[Cause] Mediaplayer do not notify to HTMLMediaElement about pause.
[Solution] Call a play()/pause() for update status of HTMLMediaElement.

Change-Id: If0b72fef764c8dceb280db28794f287442024384

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index 0c4c93e..5f89131 100755 (executable)
@@ -240,6 +240,8 @@ static GstBusSyncReply mediaPlayerPrivateSyncHandler(GstBus* bus, GstMessage* me
 static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePause(ASM_event_sources_t eventSource, void* callbackData)
 {
     MediaPlayer* player = static_cast<MediaPlayer*>(callbackData);
+    HTMLMediaElement* element = static_cast<HTMLMediaElement*>(player->mediaPlayerClient());
+
     if (!player)
         return ASM_CB_RES_IGNORE;
 
@@ -252,7 +254,7 @@ static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePause(ASM_event_sources
     case ASM_EVENT_SOURCE_RESOURCE_CONFLICT:
     case ASM_EVENT_SOURCE_EARJACK_UNPLUG:
         if (!player->url().string().contains("camera://")) {
-            player->pause();
+            element->pause();
             return ASM_CB_RES_PAUSE;
         }
     default:
@@ -264,13 +266,14 @@ static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePlay(ASM_event_sources_
 {
     MediaPlayer* player = static_cast<MediaPlayer*>(callbackData);
     HTMLMediaElement* element = static_cast<HTMLMediaElement*>(player->mediaPlayerClient());
+
     if (!player)
         return ASM_CB_RES_IGNORE;
 
     switch (eventSource) {
     case ASM_EVENT_SOURCE_ALARM_END:
         if (!element->isVideo() && !player->url().string().contains("camera://")) {
-            player->play();
+            element->play();
             return ASM_CB_RES_PLAYING;
         }
         return ASM_CB_RES_NONE;