필터 지우기
필터 지우기

uihtml doesn't play .MP4 Video

조회 수: 2 (최근 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>
<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
Mohammad Sami
Mohammad Sami 2021년 2월 12일
Can you show your code ?
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일
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.

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by