Chrome has introduced Autoplay Policy and enables playback based on
use guesture. This patch is to allow auto-playback media on tizen based
on attributes only and Removed volume checks.
W3C spec:
https://www.w3.org/TR/2011/WD-html5-
20110113/video.html#attr-media-autoplay
Reference:
https://review.tizen.org/gerrit/270035
https://review.tizen.org/gerrit/268636
Change-Id: If9a47d5f108192dc9f75386cbf9434f030bea03f
Signed-off-by: lokeshmeena <lokesh.meena@samsung.com>
if (command_line.HasSwitch(switches::kAutoplayPolicy))
return command_line.GetSwitchValueASCII(switches::kAutoplayPolicy);
+#if defined(TIZEN_MULTIMEDIA)
+ return switches::autoplay::kNoUserGestureRequiredPolicy;
+#endif
+
if (base::FeatureList::IsEnabled(media::kUnifiedAutoplay))
return switches::autoplay::kDocumentUserActivationRequiredPolicy;
presentation_receiver(false),
media_controls_enabled(true),
do_not_update_selection_on_mutating_selection_range(false),
+#if defined(TIZEN_MULTIMEDIA)
+ autoplay_policy(blink::mojom::AutoplayPolicy::kNoUserGestureRequired),
+#else
autoplay_policy(
blink::mojom::AutoplayPolicy::kDocumentUserActivationRequired),
+#endif
low_priority_iframes_threshold(
EffectiveConnectionType::kEffectiveConnectionUnknownType),
picture_in_picture_enabled(true),
return false;
}
+#if defined(TIZEN_MULTIMEDIA)
+ return DocumentShouldAutoplayMutedVideos(element_->GetDocument());
+#else
return !element_->EffectiveMediaVolume() &&
DocumentShouldAutoplayMutedVideos(element_->GetDocument());
+#endif
}
void AutoplayPolicy::StartAutoplayMutedWhenVisible() {