Jump to content

Just a question about HTML5 <video> tag


Go to solution Solved by Stuart Silvester,

Recommended Posts

Hi !

I don't know if my message is in the right place, but... I'll give it a try 😜

When I switch the editor to "Source" mode to enter HTML code, if I use an HTML5 <video> tag, the system automatically adds a "src" argument (to this tag).

In fact, the system uses the src argument of the first <source> tag it finds inside the <video> tag.

Text entered :

<video>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
</video>

Recorded text :

<video data-video-embed="" id="ips_uid_5381_4" src="movie.mp4">
  <source data-video-src="movie.mp4" src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
</video>

I could be wrong, but it seems that by doing this, the browser that doesn't support mp4 format can't switch to the ogg format source.

This is just an example, I work with H265/HEVC and AV1 codecs, but it doesn't matter.

If you have any proposals, suggestions or opinions...

Thank you very much and have a nice day !

Link to comment
Share on other sites

When no src attribute is specified in the <video> tag, the browser is free to choose the source with which it is compatible.

But if I don't put a src attribute in the <video> tag then IPB (I assume) modifies my <video> tag to add the src attribute of the first <source> tag contained in the <video> tag.

In this way, the browser ignores the different sources offered and reads the src attribute of the <video> tag in all cases.

The idea is that a browser that supports the H265 codec can play .mp4 video, while a browser that supports the AV1 codec can play .webm video.

Edited by NightAngel
Link to comment
Share on other sites

  • Solution

That's expected, due to lazy-loading.

The Javascript asks the browser which formats it can play and adds the appropriate one to the src attribute. However, I do see there's an issue there were the second source element isn't being parsed properly to have the data-video-source attribute. I was able to reproduce that and commit a fix for it.

Link to comment
Share on other sites

50 minutes ago, Stuart Silvester said:

That's expected, due to lazy-loading.

The Javascript asks the browser which formats it can play and adds the appropriate one to the src attribute. However, I do see there's an issue there were the second source element isn't being parsed properly to have the data-video-source attribute. I was able to reproduce that and commit a fix for it.

Thank you for your prompt and efficient handling of my request. 👍🏻

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...