uihtml doesn't play .MP4 Video

16 ビュー (過去 30 日間)
Korbinian Kohl
Korbinian Kohl 2021 年 2 月 12 日
編集済み: Reshma Nerella 2021 年 2 月 18 日
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>
<body style="background-color:white;font-family:arial;">
<p style="padding-left:20px">
Play audio file:
<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.
<p style="padding-left:20px">
Play video file:
<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
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 件のコメント
Korbinian Kohl
Korbinian Kohl 2021 年 2 月 12 日
i added the code, but it really is the same as the example except the name



Korbinian Kohl
Korbinian Kohl 2021 年 2 月 18 日
編集済み: Korbinian Kohl 2021 年 2 月 18 日
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

その他の回答 (1 件)

Reshma Nerella
Reshma Nerella 2021 年 2 月 18 日
編集済み: Reshma Nerella 2021 年 2 月 18 日
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.


Community Treasure Hunt

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

Start Hunting!

Translated by