tct-video-html5-tests blocks 10 cases.
[framework/web/webkit-efl.git] / Source / WebCore / html / HTMLMediaElement.cpp
index 78fe1d1..eb5cc46 100755 (executable)
@@ -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;