How to Play YouTube Videos With the JW Player

Written by kevin lee
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Play YouTube Videos With the JW Player
Simple home movies can become global sensations when placed on the Web. (Thinkstock Images/Comstock/Getty Images)

You can share your favourite YouTube videos with the world by embedding them in a JW Player. This Flash player by Longtail video is customisable and plays video files of your choice. The JavaScript code required to embed the player requires programming knowledge to understand. However, you don't have to understand the code to use the player. Longtail Video automates the set-up process and generates the code needed to display YouTube videos on the Web.

Skill level:

Other People Are Reading


    Install JW Player

  1. 1

    Proceed to the next section if you already have the JW Player. Otherwise, visit JW Player download page at

  2. 2

    Click the "Download Now" button. A pop-up window prompts you to save the ZIP file containing the JW Player and other required files.

  3. 3

    Click "Save," and then click "OK" to save the ZIP file to your hard drive.

  4. 4

    Locate the file after it downloads and double-click the file to unzip its contents to a folder. Remember the name of that folder and its location on your hard drive. This is where you will save a copy of your HTML Web page document.

    Configure Player

  1. 1

    Navigate to's "Setup Wizard" page. Click the "Select an Example Setup" drop-down box to display a list of options.

  2. 2

    Click "JW Player with a YouTube Video," and then click "Embed Parameters." Two text boxes appear named "Height" and "Width." Default height and width values appear next to those text boxes. If you wish to use other values as the dimensions for your JW Player, enter different height and width values in the appropriate text boxes. These values are in pixels.

  3. 3

    Click the "Colors" and "Layout" links if you would like to tweak the player's colours and visual style. After clicking those links, drop-down boxes and text boxes appear that allow you to choose your desired colours and layout style.

  4. 4

    Click the "Colors" and "Layout" links to tweak the player's colours and visual style. After clicking those links, drop-down boxes and text boxes appear that allow you to choose your desired colours and layout style.

  5. 5

    Click "Behavior," and then click the "Autostart" drop-down" menu. Click "True" to make the player start when your Web page loads. Otherwise, click "False."

  6. 6

    Open another browser window or tab, and navigate to YouTube's website. Double-click the name of a video you would like to add to the JW Player. The video plays.

  7. 7

    Click "Pause" and locate the "Address" box at the top of your browser where you type URLs. This box contains the video's URL.

  8. 8

    Copy that URL using your mouse and return to the LongTail Video *. Click the "File Properties" link, and paste the URL you copied into the "File" text box. That URL looks similar to this one:

  9. 9

    Click "Update Preview & Code." The site displays a video player. Click the "Play" button to preview your YouTube video. Locate the "Copy Your Code" text box below the player. Use your mouse to copy that code to the Windows Clipboard.

  10. 10

    Launch Notepad or your HTML editor and open one of your Web page documents.

    Add to Web Page

  1. 1

    Paste the code you copied into the document's "body" section. This is JavaScript code. It embeds the JW Player into your Web page.

  2. 2

    Save the document in the same folder that contains the JW Player files. This is the folder containing the files you unzipped in Section 1.

  3. 3

    Open that folder, and double-click your HTML document. Your browser opens and displays the JW Player. If you chose the "Autostart" option during configuration, your selected YouTube video plays. Otherwise, click the "Play" button to watch your video.

  4. 4

    Upload your HTML document and the following three files to your Web server when you are ready to place your page on the Internet: player.swf, jwplayer.js and swfobject.js. When site visitors visit your Web page, they will be able to view the JW Player and play the YouTube video.

Tips and warnings

  • Because the embedded JW Player is inside a JavaScript block, you can position the player anywhere you like within the document's "body" section. For instance, to make the player appear at the top of your Web page, paste the code right after the opening "body" tag. To place it after any other element on your page, such as an image, paste the code after that element.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.