• Resolved kayus65

    (@kayus65)


    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="https://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="https://ccc.net/thumbs/blood_covenant.jpg" onclick="jwplayer().load({file:'https://ccc.net/streams/divine_ownership.mp4'});jwplayer().play();">

    many thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘video player and javascript’ is closed to new replies.