Image preloaded for JW Player?
-
Is there a way of putting an image in the shortcode for a video with your shortcodes? I found something at longtailvideo.com but it talks about putting a script after a div. I removed your shortcode and tried this in a widget on the sidebar, but that didn’t work.
Here is the link that I found telling how to do this with javascript: https://www.longtailvideo.com/support/jw-player/28839/embedding-the-player. And the directions:
Insert a <div> element with a unique id in the body of your page, at the location you want the player to appear:
<div id=”myElement”>Loading the player …</div>
Right below it, insert a script that invokes the JW Player setup() call on your <div>:
<script type=”text/javascript”>
jwplayer(“myElement”).setup({
file: “/uploads/example.mp4”,
height: 360,
image: “/uploads/example.jpg”,
width: 640
});
</script>The last code block is where the heavy lifting happens. The script tells the JW Player library to setup a player instance over the DOM element with ID container. Inside the setup call, the script provides a list of options for configuring the player.
I really would like to do this without installing the JW Player plugin…if possible.
So far I am finding your plugin very helpful…though still lots to learn.
Thank you for sharing!
- The topic ‘Image preloaded for JW Player?’ is closed to new replies.