Title: video player and javascript
Last modified: August 31, 2016

---

# video player and javascript

 *  Resolved [kayus65](https://wordpress.org/support/users/kayus65/)
 * (@kayus65)
 * [10 years ago](https://wordpress.org/support/topic/video-player-and-javascript/)
 * Hello there everyone
 * Can someone please tell me how to properly implement this with javascript.
 * I am creating several thumbnails, when an image is clicked, it should load an
   MP4 video file into the player. I don’t want the players in multiple pages that.
 * This is the code that I am using, I have placed this directly in the text view
   of my page, but the thumbnail is not working. Do I need to call javascript from
   somewhere. If anyone has a tutorial on this I will appreciate it or point me 
   in the right direction
 *     ```
       <script src="http://xxxxxxxxx.com/jwplayer6/jwplayer.js"></script>
       <script>jwplayer.key="xxxxxxxxxxx";</script>
   
       <div id="myDiv">This text will be replaced with a player.</div>
       <script>
       jwplayer("myDiv").setup({
           "file": "",
           "image": "",
           "height": 360,
           "width": 640
       });
       </script>
   
       <img src="http://ccc.net/thumbs/blood_covenant.jpg" onclick="jwplayer().load({file:'http://ccc.net/streams/divine_ownership.mp4'});jwplayer().play();">
       ```
   
 * many thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [kayus65](https://wordpress.org/support/users/kayus65/)
 * (@kayus65)
 * [10 years ago](https://wordpress.org/support/topic/video-player-and-javascript/#post-7437225)
 * No Worries guys; the above code actually worked.
 * K

Viewing 1 replies (of 1 total)

The topic ‘video player and javascript’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [kayus65](https://wordpress.org/support/users/kayus65/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/video-player-and-javascript/#post-7437225)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
