[Drupal] How to test embed code functionality in Youtube in a Drupal website

| | 2 min read

Suppose your Drupal project has the option to upload Youtube videos which will be displayed in the site. Adminstrator has the option to upload videos in two ways

  1. Admin can add Youtube through direct url uploading.
  2. Admin can add Youtube through adding a video embed code of youtube.

And you have to test the functionality of adding a video embed code from Youtube. Before starting the testing process let us check what is meant by embed code. Embed code usually contains html code that can be copied and pasted in your website which display the corresponding video in your website. Most of the video players have the option to provide the embed code and you can use that code in your content.

Please check the below process to test the functionality of Youtube through adding a video embed code of Youtube.

  1. Open any Youtube video which provide the embed code.
  2. Click the Share link under the video.
  3. Click the 'Embed' link in the expanded box.
  4. Copy the embed code displayed in the expanded box.
  5. Paste the code into your blog or website where you have to option to add code.
  6. Save the page after giving the necessary details.
  7. And check whether the Youtube video is displayed or not.

For you better understanding please refer below the image.
code.jpg

You can check the working of the embed code in your system by doing the below process.

  1. Open a text editor.
  2. Type
    <html> </html>  
  3. And paste the embed code between the html tags.
  4. Save it and open the file in any browser.

Thus after saving the content page of you website, you can see the Youtube video in your website. There you have the option to play the video . If the video is playing well you can ensure that the embed code functionality is working fine in your website.