Embedding private vimeo videos in tinymce

579 Views Asked by At

I'm having problems embedding private vimeo videos in tinymce. The videos are allowed to be embedded on the domain I'm using, and if I just add them outside of tinymce everything is ok.

Whenever added inside tinymce I'm faced with the "is not allowed to be embedded here" message from vimeo.

If I remove the privacy all together I can embed without any problems, so I assume the way vimeo detects the domain is the culprit, and probably the iframe inside iframe that the editor really is is to blame.

But that's how far I can follow. Anyone able to take it further?

Simple example is simply:

<!DOCTYPE html>
<html>
  <head>
    <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
    <script>
       tinymce.init({selector:'textarea'});
    </script>
  </head>
  <body>

    <textarea>
      <iframe src="//player.vimeo.com/video/[video id]" width="500" height="375" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
    </textarea>

  </body>
</html>
1

There are 1 best solutions below

0
On

It looks like TinyMCE creates an iframe around the contents without a src on the iframe, which means we don't see a domain and it fails the privacy check. I think your only option for getting it working in the preview is to make it public.