uihtml doesn't play .MP4 Video

7 visualizaciones (últimos 30 días)
Korbinian Kohl
Korbinian Kohl el 12 de Feb. de 2021
Editada: Reshma Nerella el 18 de Feb. de 2021
Hey Guys,
because of the ending support of ActiveX i am trying to change my Video Player to an uihtml element.
But i am facing the following problem:
I am working with the given example of the xylophone.
The Problem now is, when i change the Video Source to my file it doens't work anymore. It only shows a black box with the controls in it.
The two videos are stored in the same folder and i am only changing the name. It is still a .MP4 video like the xylophone one.
<!DOCTYPE html>
<html>
<body style="background-color:white;font-family:arial;">
<p style="padding-left:20px">
Play audio file:
</p>
<audio controls style="padding-left:20px">
<source src="./handel_audio.wav" type="audio/wav">
<source src="./handel_audio.oga" type="audio/ogg">
Your browser does not support the audio tag.
</audio>
<p style="padding-left:20px">
Play video file:
</p>
<video width="320" height="240" controls style="padding-left:20px">
<source src="./myVideoFile.mp4" type="video/mp4">
% <source src="./xylophone_video.mp4" type="video/mp4"> This is the original code
</video>
</body>
</html>
On the other Hand if i open the .HTML outside matlab it works like a Charm. Done that with Firefox and Chrome.
On Chromium it is not working. But the Xylophone one does. I also checked the codec of both videos and it is the same.
Am i missing something?
Any help is aprreciated.
PS i set the Matlab Browser to the inbuilt Browser and opened up a HTML5 test website (https://tekeye.uk/html/html5-video-test-page) and the MP4 video doenst play either. So Looks like Matlab simply doesn't support MP4 in HTML. Which is sad, because they say you should use UIHTML instead of activeX for Videos but it doesnt work so meh.
  2 comentarios
Mohammad Sami
Mohammad Sami el 12 de Feb. de 2021
Can you show your code ?
Korbinian Kohl
Korbinian Kohl el 12 de Feb. de 2021
i added the code, but it really is the same as the example except the name

Iniciar sesión para comentar.

Respuesta aceptada

Korbinian Kohl
Korbinian Kohl el 18 de Feb. de 2021
Editada: Korbinian Kohl el 18 de Feb. de 2021
Just got the Answer from Matlab, this is at the Moment simply not possible.
I'll use my ActiveX component until this will be integrated.
However it would work if i used a differnt File Format like .ogg

Más respuestas (1)

Reshma Nerella
Reshma Nerella el 18 de Feb. de 2021
Editada: Reshma Nerella el 18 de Feb. de 2021
Hi,
Built-in MATLAB browser does not support playing .mp4 videos. I have brought this issue to the concerned people and it might be considered in any future release.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by