Hi. I’ve found your plugin works brilliantly. I especially like that it detects all YouTube iframes on a page.
However, I’m inserting my YouTube video using the YouTube API script. This is because I want to track events when the video is played, and watched all the way through. I can only do that when inserting the code with the API.
A demo the API script is here: https://gatipoftheday.com/to-track-embedded-youtube-dont-use-the-default-embed/
What I’m finding is that the script still inserts an iframe, but the FluidVids plugin is not detecting that iframe. If I insert a normal YouTube iframe directly FluidVids works. But when inserting it using this script it doesn’t work.
Is there anything that can be done to make FluidVids work with the YouTube API script?
]]>Hi. I installed the plugin, and found an Uncaught SyntaxError: Unexpected identifier.
I tracked it down to this line that it was inserting:
fluidvids.init({selector: ['iframe', 'object',]players: ['www.youtube.com', 'player.vimeo.com',]});
It is missing a comma after the selector closing ]
I found I could fix it in this file:
fluidvids/class-fluidvids.php
I changed this:
$html .= 'selector: [' . $this->esc_fluidvids( $selectors ) . ']';
to this
$html .= 'selector: [' . $this->esc_fluidvids( $selectors ) . '],';
and the error was fixed.
]]>Please update the JavaScript library to the latest version (2.2.0).
]]>Please read this and follow these guidelines before opening a new thread:
Update FluidVids for WordPress to the latest version. Older versions are not supported.
Search the forums for similar threads and see if any of the proposed solutions work for you. Please do not hijack that thread.
To find out what is causing the issue, disable all your other plugins and switch to the default WordPress theme for a bit. If the problem persists then open a thread. If there is a clash with another theme or plugin please mention those in the thread too.
Finally, if you decide to open a new thread, please follow the following guidelines:
Please indicate:
Ulrich
]]>