1

I am new to Drupal and setting up my first site. I am keeping it fairly basic and have not added on much. I am able to embed uploaded videos without any problem, but when I attempt to embed a remote video in an article, the video does not show, instead it shows the word 'media'. I have tried uploading the video through the Content -> Media and also during the creation of the article. I have tried embedding a youtube video and a vimeo video and they both respond the same way. I wonder if the cause of the problem is that the max_width and max_height are both set to 0, if so, I have not seen any place that I can change that.

<div data-quickedit-field-id="node/8/field_media/en/full" class="field field--name-field-media field--type-entity-reference field--label-above">
<div class="field__label">Media</div>
          <div class="field__item"><article data-quickedit-entity-id="media/9" class="contextual-region media media--type-remote-video media--view-mode-default">

        <div data-quickedit-field-id="media/9/field_media_oembed_video/en/default" class="field field--name-field-media-oembed-video field--type-string field--label-hidden field__item"><iframe src="https://www.vimeo.com/media/oembed?url=https%3A//youtu.be/-XjIoKCiHgM&amp;max_width=0&amp;max_height=0&amp;hash=cxX4QeYu6zssU9WW-q1T_OhN4mwlmUoOFZfWI05j5Fs" frameborder="0" allowtransparency width="480" height="270" class="media-oembed-content" title="From my Blowhole to your Ear Hole by Whales of Ontario"></iframe>

Here is a link to the page that I pulled the code from, http://www.boundlessmotion.com/online/node/8

Any help is appreciated.

2
  • Update: I changed the Media settings to https://player.vimeo.com/ I also changed the linked video to include the player prefix. Now I get a message stating that the video does not exist. <iframe src="https://player.vimeo.com/media/oembed?url=https%3A//player.vimeo.com/video/398501958&amp;max_width=0&amp;max_height=0&amp;hash=VKXiTirDCUN87h3xVxBPNVYP3d591NYigr9P9aksjk4" frameborder="0" allowtransparency width="240" height="426" class="media-oembed-content" title="Beginners Plus"></iframe>
    – st.bobo
    Mar 19 '20 at 16:44
  • I have a work-around that I am not particularly happy with. I have added the Video Embed Field module. It is supposed to be replaced by the remote video section of the core module, but at least it allows me to play remote videos from Vimeo. I still would like to get an answer to this problem so that i can utilize existing functionality of the core module.
    – st.bobo
    Mar 19 '20 at 19:24
0

If you check your console in your DevTools, you can see the error message says:

enter image description here

It says that Vimeo allows the content to be displayed only from the Same Domain. The Vimeo videos provide links in the following format which can be embedded in external websites.

https://player.vimeo.com/video/12345.

You can try embedding video in the above format.

6
  • Thank you for responding. I updated my embedded vimeo video, but it is still showing the text, 'media' rather than the video. My iframe code with the updated (yet still dead) link. <iframe src="https://www.vimeo.com/media/oembed?url=https%3A//player.vimeo.com/video/398501958&amp;max_width=0&amp;max_height=0&amp;hash=VKXiTirDCUN87h3xVxBPNVYP3d591NYigr9P9aksjk4" frameborder="0" allowtransparency width="240" height="426" class="media-oembed-content" title="Beginners Plus"></iframe>
    – st.bobo
    Mar 19 '20 at 12:07
  • The link in src is still showing vimeo.com. It should be player.vimeo.com/video/398501958 Mar 19 '20 at 14:28
  • I might be missing the problem, the source is vimeo.com, but it links to the player.vimeo.com through the oembed. I did not create that code. When I added the remote video, I used the URL, https://player.vimeo.com/video/398501958, the rest of the code is created by drupal when the video is added to the article, boundlessmotion.com/online/node/6
    – st.bobo
    Mar 19 '20 at 16:28
  • I tried changing the iframe domain in Media Settings to include the player.vimeo.com and now it get a frame on the article stating that the video does not exist
    – st.bobo
    Mar 19 '20 at 16:45
  • If you click on the share button on the video, you will get the embed code. If you paste that code in your drupal site, it should work. Mar 19 '20 at 21:26
0

My solution was not the most effective, but ultimately, it solved the problem. I added the Video Embed Field module which allows a video to embedded into the body of an article. For some reason, this method allowed the video to be viewed whereas the approach of using the media oembed in the core module does not work for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.