[TTVD] Add ewk notification about Suspend-Resume state on browser start 20/319120/7
authorMichal Jurkiewicz <m.jurkiewicz@samsung.com>
Fri, 11 Oct 2024 15:22:38 +0000 (17:22 +0200)
committerBot Blink <blinkbot@samsung.com>
Tue, 15 Oct 2024 11:55:00 +0000 (11:55 +0000)
[Problem]
When running WebRTC application in Browser, incoming stream
is not visible (black screen).

[Cause]
On Browser launcher no initial state for `SuspendResumeServiceImpl`
is being provided when application is run.

It results in setting `suspend_resume::State::SUSPENDED`
in `SwitchableVideoDecoderWrapper`, which prevents both HW and SW
decoders from being initialized.

For WRT launcher such implementation is provided in
`WRTNativeWindowTV::UpdateSuspendResumeState()` method.

[Solution]
Add state reporting for Browser when application is run / stopped
in `EWebView::Show()` and `EWebView::Hide()` methods.

Bug: https://jira-eu.sec.samsung.net/browse/VDWASM-1846
Change-Id: Ide5c8baa57d932aebb76a82dd3273db37951b7e2
Signed-off-by: Michal Jurkiewicz <m.jurkiewicz@samsung.com>
tizen_src/ewk/efl_integration/eweb_view.cc

index 6af2f7663468df4d869be1fd3f073078e48b7189..ce338448313af00cf5e038f5291fae15292051d2 100644 (file)
@@ -930,6 +930,8 @@ int EWebView::GetOrientation() {
 void EWebView::Show() {
   evas_object_show(efl_main_layout_);
   web_contents_->WasShown();
+
+  suspend_resume::NotifyStateChange(suspend_resume::State::RESUMED);
 }
 
 void EWebView::Hide() {
@@ -939,6 +941,8 @@ void EWebView::Hide() {
     return;
   }
   web_contents_->WasHidden();
+
+  suspend_resume::NotifyStateChange(suspend_resume::State::SUSPENDED);
 }
 /* LCOV_EXCL_STOP */
 void EWebView::SetViewAuthCallback(Ewk_View_Authentication_Callback callback,