MATLAB: Autoplay a video in uihtml matlab 2020a

uihtml

Hello ,
I am using uihtml in app desginer gui to play a video,I could embed a video in the uifigure.but it plays when I press the play button.
Is there a way to autoplay a video in uihtml?
my current HTML script looks like this :
<!DOCTYPE html>
<html>
<body style="background-color:black;font-family:arial;">
<video width="583" height="325" controls autoplay>
<source src="./movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>

Best Answer

Found a solution for this, 'muted' should be added with autoplay to enable autoplay in uihtml in matlab
<!DOCTYPE html>
<html>
<body style="background-color:black;font-family:arial;">
<video width="583" height="325" autoplay muted loop>
<source src="./movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
Related Question