Jump to content

Video tag help


MockoB

Recommended Posts

I'm trying to implement video tag with preload="none" attribute in my products' pages, because iframe video is killing my page performance, unfortunately without any success so far. 

Here is a sample code I'm putting in the products' description source code field:

<video width="300" height="150" controls="controls" preload="none">
  <source src="https://youtu.be/pski9AHrAp0" type="video/mp4">
  Your browser does not support the video tag.
</video>

I'm seeing the player with buttons in the front end, but cant play any media. 

Turned html purifier on/off with same result.

Any help will be highly appreciated. 

Link to comment
Share on other sites

28 minutes ago, MockoB said:

<video width="300" height="150" controls="controls" preload="none">
  <source src="https://youtu.be/pski9AHrAp0" type="video/mp4">
  Your browser does not support the video tag.
</video>

Hi,

The URL provided (https://youtu.be/pski9AHrAp0) appears to be a YouTube URL, which cannot be directly used as the source for a <video> tag. YouTube uses an embedded player that cannot be loaded in a <video> tag using the src attribute.

Link to comment
Share on other sites

To embed a YouTube video using the <video> tag, you need to use the YouTube embedded player URL rather than the regular YouTube URL.

<video width="300" height="150" controls="controls" preload="none">
  <source src="https://www.youtube.com/embed/pski9AHrAp0" type="text/html">
  Your browser does not support the video tag.
</video>

With this modification, the YouTube video should load and play within the <video> tag on your product page.

Add Like / Cup if it's helpful!

Thanks!

  • Thanks 1
Link to comment
Share on other sites

It seems videos could be played with video tag, only if you have the full video path. Youtube links don't do the job unfortunately. It's irony that google is killing page performance with his own platform, against all their recommendations... They recommend using videos on your pages, but youtube is killing your SEO. 

Link to comment
Share on other sites

44 minutes ago, MockoB said:

It seems videos could be played with video tag, only if you have the full video path. Youtube links don't do the job unfortunately. It's irony that google is killing page performance with his own platform, against all their recommendations... They recommend using videos on your pages, but youtube is killing your SEO. 

YouTube has a splendid Business Model which screws basically all people hosting with rather poor specs.
The video won't play nicely under 3GB Ram and no shared hosting offers that.
Google or ABC Management are not among those Customerfriendly guys.

Do as I say and don't do as I do. That seems to be their motto. Zuck is not far off with Threads ;)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...