Jump to content

Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)


ryan

Recommended Posts

Just now, artaylor said:

@PWaddict: Yes it is a textarea with an Inputfield Type of CKEditor

Is the Content Type: Markup/HTML? If you have that too then I'm not sure why it's not properly working for you. Maybe another installed module causing this issue. 

Link to comment
Share on other sites

Attached a screengrab of the field setup screen.

Not sure if it matters, but when I tried to do the standard install of the module via Module Class Name, I got some weird errors from PW site, so, I installed it manually.

It is listed in the modules list and I can access the settings so I am assuming the manual install went ok. I think I will uninstall then reinstall the module and see if that helps.

screenshot-2017-03-27-20-52-38.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

seems to have stopped working on a fresh module install on a new site, not had an issue before now with hthis great module. PW v3.0.36, no errors in my logs, just link showing up no video

Link to comment
Share on other sites

On 2017-5-22 at 10:31 AM, benbyf said:

seems to have stopped working on a fresh module install on a new site, not had an issue before now with hthis great module. PW v3.0.36, no errors in my logs, just link showing up no video

Remove the link and it should kick in again. Needs to just be plain text. 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Dummy question here:

If I wanted the plugin to add a specific player parameter to all youtube shortlinks (e.g. enablejsapi=1) where would be the best place to add this?
I changed line 170 to:

"&format=json&maxwidth={$this->maxWidth}&maxheight={$this->maxHeight}&enablejsapi=1&html5=1";

but since the oembed?url gets rewritten by youtube I'm not sure this is working. Any pointers?

Cheers guys!

Link to comment
Share on other sites

30 minutes ago, phil_s said:

Dummy question here:

If I wanted the plugin to add a specific player parameter to all youtube shortlinks (e.g. enablejsapi=1) where would be the best place to add this?
I changed line 170 to:


"&format=json&maxwidth={$this->maxWidth}&maxheight={$this->maxHeight}&enablejsapi=1&html5=1";

but since the oembed?url gets rewritten by youtube I'm not sure this is working. Any pointers?

Cheers guys!

Use the Global Options for Embedded YouTube/Vimeo Videos module to add player parameters.

Link to comment
Share on other sites

  • 3 months later...
1 hour ago, renobird said:

What's the current method for getting this to work with CKEditor?
I can't turn off HTML Purifier, or ACF.

This module is a textformatter, so it doesn't write anything to the CKEditor field. As long as you can insert a link URL into your field as text without interference from HTML Purifier then there shouldn't be any problem.

Link to comment
Share on other sites

2 minutes ago, renobird said:

since it appears that the <iframe> tags

There shouldn't be any iframe tags involved - you simply insert the URL to the video (not an embed snippet or anything like that) in a new paragraph in your CKEditor field.

Link to comment
Share on other sites

I might be wrong, but my understanding is that the ACF/Purifier settings for a CKEditor field only affect content that goes through the CKEditor inputfield and is then saved to the database.

A textformatter on the other hand never saves its changes to the database and it isn't involved with the inputfield - it just makes changes on-the-fly as the content is output to the front-end.

Another thought: if you have multiple textformatters applied, check to see if the order they are applied makes a difference.

  • Like 2
Link to comment
Share on other sites

Yeah, that's right. At least that's my understanding as well. I just can't figure out why it won't work with CKEditor, even when it's the only textFormatter. I thought perhaps there was some other interaction with CKEditor that I was missing. Maybe that's not the issue at all. I'm stumped. I'll try a fresh install and work my way backwards. 

Link to comment
Share on other sites

What @horst said.

Also I got the same issue two days ago while I was trying to insert Facebook video in CKEditor. I needed to add this line to the Extra Allowed Content field to support iframe with HTML Purifier On: iframe[src,title,width,height,allowfullscreen,frameborder]

 

EAC.thumb.png.6fb42c681db8e5d20f23e08e7f1787cc.png

  • Like 3
Link to comment
Share on other sites

6 hours ago, flydev said:

Also I got the same issue two days ago while I was trying to insert Facebook video in CKEditor. I needed to add this line to the Extra Allowed Content field to support iframe with HTML Purifier On: iframe[src,title,width,height,allowfullscreen,frameborder]

Not actually the same issue - this module doesn't insert iframe (or any other code) into the RTE field. It's a textformatter, so it converts the youtube "view" URL into an iframe embedded URL on page load (frontend) only.

Link to comment
Share on other sites

Just wanted to report back in case I can save anyone else an hour or so.

After bashing my head against this I finally tracked it down to domain restrictions on some of the Vimeo videos.
In my test env I was using Youtube and Vimeo links from my personal account (no embed restrictions).
In production we were using Vimeo links from a colleagues account — they all had domain restrictions set.

Removed the restrictions, and waddya know, it works just fine.

 

  • Like 5
Link to comment
Share on other sites

  • 1 month later...

Hi all. This has been driving me nuts: I've used this module previously and it worked perfectly. I've got it on 2 sites, but music-related. One works normally; I use the textformatter on the body text and videos display fine. The other only works if it's a Vimeo video; YouTube URLs slow the page loading then only displays the URL. I've tried a number of tests and different URLs and I can't figure this out. Both sites are not new and I'm pretty sure that it used to work where now it doesn't.

Here are two samples (they are past gigs, so I can play around with them without messing up the live sites):

Works: https://waveneyvalleyfolkcollective.co.uk/events/kirsty-merryn-jack-harris/

Doesn't Work: http://www.burstoncrown.com/events/sunday-sessions/falling-from-trees/

Any suggestions?

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...