case ASM_EVENT_SOURCE_EMERGENCY_START:
case ASM_EVENT_SOURCE_OTHER_PLAYER_APP:
case ASM_EVENT_SOURCE_RESOURCE_CONFLICT:
- player->pause();
- return ASM_CB_RES_PAUSE;
case ASM_EVENT_SOURCE_EARJACK_UNPLUG:
if (!player->url().string().contains("camera://")) {
player->pause();
static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePlay(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;
switch (eventSource) {
case ASM_EVENT_SOURCE_ALARM_END:
- if (!player->hasVideo()) {
- player->play();
- return ASM_CB_RES_PLAYING;
- } else if (player->url().string().contains("camera://")) {
+ if (!element->isVideo() && !player->url().string().contains("camera://")) {
player->play();
return ASM_CB_RES_PLAYING;
}
void MediaPlayerPrivateGStreamer::play()
{
#if ENABLE(TIZEN_GSTREAMER_AUDIO)
- if (m_audioSessionManager && !m_audioSessionManager->setSoundState(ASM_STATE_PLAYING))
+ if (!m_audioSessionManager->setSoundState(ASM_STATE_PLAYING) && !isLocalMediaStream())
return;
#endif
if (changePipelineState(GST_STATE_PLAYING)) {
void MediaPlayerPrivateGStreamer::pause()
{
#if ENABLE(TIZEN_GSTREAMER_AUDIO)
- if (m_audioSessionManager && !m_audioSessionManager->setSoundState(ASM_STATE_PAUSE))
+ if (!m_audioSessionManager->setSoundState(ASM_STATE_PAUSE) && !isLocalMediaStream())
return;
#endif
if (m_isEndReached)