The video playback is abnormal when switching tabs in web browser.
This patch suspends a video sent to background.
Reference: https://review.tizen.org/gerrit/285247/
Change-Id: Ia429bcbfb3a4ce6b4d005694a7dd27a566a10903
Signed-off-by: Koyyani Maheswari <m.koyyani@samsung.com>
DCHECK(main_task_runner_->BelongsToCurrentThread());
// Backgrounding a video requires a user gesture to resume playback.
- if (IsHidden())
+ if (IsHidden()) {
+#if defined(TIZEN_MULTIMEDIA)
+ // Suspend if the video is sent to background.
+ PauseVideoIfNeeded();
+ SetSuspendState(true);
+#endif
video_locked_when_paused_when_hidden_ = true;
+ }
if (watch_time_reporter_)
watch_time_reporter_->OnHidden();