Hi,

Folks at YouTube just changed their embed code from flash to iframe, which mean that when I try to embed the code into the video embed field it's no longer being accepted.

Does any one know how to fix this? I tried looking into video embed settings, but didn't see anything there for Iframe settings, can someone please let me know how they were able to fix this?
I just need to be able to post iframe code into the video embed field and have it show up on the page.

Thank you.

Comments

gbrands’s picture

You might want to post this in the video embed module's issue queue.

janis_lv’s picture

Input filter, allow iframe tag.

mcabalaji’s picture

The New youtube embed code has src url like this "http://www.youtube.com/embed/ISAL-e-qhSI" , The problem here is in emfield it does a check for the provider . so the below function emvideo_youtube_extract is called and the return array to check the match looks like this " v/ , watch?v= , ?v= " , So the regex fails when matching as our url has embed instead of the mentioned 3 so it fails . So add the below line youtube.inc to make it work

'@youtube\.com/embed/([^"\& ]+)@i',


    Index: emfield/contrib/emvideo/providers/youtube.inc
===================================================================
--- emfield/contrib/emvideo/providers/youtube.inc	(revision 2032)
+++ emfield/contrib/emvideo/providers/youtube.inc	(working copy)
@@ -340,6 +340,7 @@
     '@youtube\.com/v/([^"\& ]+)@i',
     '@youtube\.com/watch\?v=([^"\& ]+)@i',
     '@youtube\.com/\?v=([^"\& ]+)@i',
+    '@youtube\.com/embed/([^"\& ]+)@i',
   );
 }

 
Hipster’s picture

Thank you very much for your time. Youtube actually has option to post old code so that's what I"m using for now, and I'm sure embed code module will probably get updated.

I really appreciate your time and help.