X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Source%2FWebCore%2Fhtml%2FHTMLMediaElement.cpp;h=eb5cc46a139e56e27c953d1182305179c9bdc1de;hb=f5881a42a95fb8928187fbd4faefaf0602e91d1d;hp=78fe1d1f5c4c2296b68d859392fa8461ccf58b2e;hpb=1831f1db2657668990cedb916ad2a9e3af9b25fd;p=framework%2Fweb%2Fwebkit-efl.git diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index 78fe1d1..eb5cc46 100755 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -537,6 +537,10 @@ Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* HTMLElement::insertedInto(insertionPoint); if (insertionPoint->inDocument() && !getAttribute(srcAttr).isEmpty() && m_networkState == NETWORK_EMPTY) scheduleLoad(MediaResource); + +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + resume(); +#endif configureMediaControls(); return InsertionDone; } @@ -547,7 +551,11 @@ void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint) LOG(Media, "HTMLMediaElement::removedFromDocument"); configureMediaControls(); if (m_networkState > NETWORK_EMPTY) +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + suspend(PageWillBeSuspended); +#else pause(); +#endif if (m_isFullscreen) exitFullscreen(); } @@ -3920,6 +3928,8 @@ void HTMLMediaElement::stop() stopPeriodicTimers(); cancelPendingEventsAndCallbacks(); #if ENABLE(TIZEN_GSTREAMER_VIDEO) + if (m_player) + m_player->suspend(); if (isVideo()) power_unlock_state(POWER_STATE_NORMAL); #endif @@ -4784,6 +4794,9 @@ bool HTMLMediaElement::shouldSuspendMedia() if (isVideo()) return true; + if (m_player->hasVideo()) + return true; + #if ENABLE(TIZEN_EXTENSIBLE_API) if (!TizenExtensibleAPI::extensibleAPI().backgroundMusic()) return true;