HTML5 Youtube not embedding
-
I’ve tried several ways and plugins trying to embed a youtube video. The only way I was able to get it to work was this way
[youtube_video id="QOnSi7k7oeA"]
as shown on this site:Which uses flash. Every other way that uses HTML5 either leaves a blank space where the video should be, or posts the link. When I use the visual editor, the video shows in the box, but not when I publish or preview.
This is a page that I inherited from someone else, so maybe some sort of CSS is blocking it? I have disabled all plugins, and it still doesn’t work.
I’ve just used the link, tried [embed], tried shortcode, etc. Same goes for Vimeo. I am using the Avada theme. I am not doing it wrong, so something is preventing the embedding. Any Ideas where to start looking?
-
Javascript would be my first guess, but even before looking at that I would disable plugins and check to see that it’s working properly. Then, assuming it’s working, I’d slowly activate plugins one by one, each time checking if you’re embedding still works. If you find that a plugin is causing the trouble write to the plugin author, let them know about it and see if they can provide a solution.
Thanks Paul,
I’ve already tried disabling plugins, like I noted above. Any other ideas or suggestions? I think it somehow has to do with the Fusion / Avada theme, but not sure where to start.
Here is an example page.
I have embedded video 3 ways. I see no video, but can hear audio. I am running my own Ubuntu web server.
here is what is in my text editor
`[youtube id=”QOnSi7k7oeA” width=”960″ height=”540″ autoplay=”yes” ‘api_params=”&rel=0″ class=””][/youtube]
‘[embed]https://www.youtube.com/watch?v=QOnSi7k7oeA[/embed]
‘https://www.youtube.com/watch?v=QOnSi7k7oeA
The strange part is, is that sometimes it works when I reload the browser.
Your theme needs an update.
Specifically, the main.min.js file has errors in it. The code with the errors looks like this:
...a:not([href=#]...Contact the author of the theme, get the fixes from them.
More info on this problem:
https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7#post-8271654
Note that yes, that error will prevent the JS from running properly, which is why your YouTube videos are not displaying. The iframes are hidden by default, by the theme, and it uses JS code to cause them to show up again. When the JS does not run, the code to make them appear does not run.
Get an updated version of the theme. Only fix.
The topic ‘HTML5 Youtube not embedding’ is closed to new replies.