View Issue Details

IDProjectCategoryView StatusLast Update
0009802New issuesCEFpublic2018-02-19 09:56
ReporterthisdpAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0009802: Some HTML5 Tag doesn't work in Local CEF (Google Chrome is fine)
Description

Since Audio/Video tag is new feature of HTML5, I attempted to use Video tag to play video with local mode, but the video seemed not to be loaded and not able to be played (No errors when calling "video.play()" in javascript), even I delayed the calling of "play" function.

Then I managed to use google chrome, input the code, and worked fine.

Steps To Reproduce

var element = document.createElement("VIDEO");
element.id = "element";
element.width = 600;
element.height = 600;
element.loop = true;
element.autoplay = true;
element.conrtol = true;
document.body.appendChild(element);
var source = document.createElement("source");
source.src = "video.mp4";
element.appendChild(source);
element.play();

TagsNo tags attached.

Activities

TGpieT

2018-01-13 11:56

viewer   ~~0026395

Instead of just using "video.mp4", shouldn't you use the local scheme handler of MTA?
This means "http://mta/local/video.mp4"; in your case.

For more information:
https://wiki.multitheftauto.com/wiki/Local_Scheme_Handler

thisdp

2018-01-13 14:05

viewer   ~~0026396

It is the same. I use the CEF in Local Mode
Either "http://mta/local/video.mp4"; or "http://mta/resourceName/video.mp4";, even "video.mp4" is tested.
While Google Chrome Works fine.

thisdp

2018-01-13 14:05

viewer   ~~0026397

since "file:///D:/xxx/video.mp4" is not allowed to access.

thisdp

2018-01-30 08:28

viewer   ~~0026414

He has the same problem:
https://forum.mtasa.com/topic/102484-cef-audio/

Inspirator

2018-02-12 22:02

viewer   ~~0026426

HTML5 video works fine for me:

<video width="500" controls>
<source src="http://mta/local/public/test.webm"; type="video/webm">
</video>

Didn't try it with javascript though

Did you reference the video file in your meta.xml?

einheit-101

2018-02-13 18:11

reporter   ~~0026427

So it is now possible to play videos stored inside the resource in MTA?
Which formats does this support?

thisdp

2018-02-14 09:07

viewer   ~~0026428

What Formats does video and audio support?
These formats are passed !
Video: webm
Audio: ogg

Hope that CEF supports more formats!

Jusonex

2018-02-14 16:59

administrator   ~~0026429

Last edited: 2018-02-14 16:59

View 2 revisions

Some codecs (e.g. H.264/MP4) are proprietary and therefore require a license. These licenses are however not included in Chromium (Chrome is basically Chromium + proprietary codecs) and CEF.

So the rule is: All free codecs that are supported by Chrome, work.

thisdp

2018-02-19 09:56

viewer   ~~0026438

Is there any way to play mp3 file?

Issue History

Date Modified Username Field Change