First of all, I’m not using WP JWPlayer Plugin. (And i don’t want it. And thats the another story)
Well in the Template file:
<div id='myJWPlayer'></div>
<script>
jQuery(document).ready(function(){
jwplayer("myJWPlayer").setup({
playlist: "http://www.example.com/playlist.xml",
listbar: {
position: 'right',
size: 250
},
width: 700,
height: 400
});
});
</script>
It is not working, since even the jwplayer("myJWPlayer")
call is not being triggered.
Note: This codes are perfectly working in pure HTML files.
Any idea please?
Well use the below Template file: [YOU FORGOT TO CLOSE THE DOUBLE QUOTES]
Also Check your playlist if it is correctly generated
how-to-generate-a-valid-playlistxml
jw-player-xml-playlist-and-javascript
Also Check out this blog about jwplayer playlist
jwplayer-playlist
If you are interested in wordpress plug-in you can check it here
getting-started-with-the-wordpress-plugin
jw-player-plugin-for-wordpress
wordpress-video-tutorial-how-to-install-jw-player-plugin
Hope Above Information Helps 🙂
Actually i need to properly enqueue the JS call in WP way. Not by the normal HTML way like
<script ....js />
. Got answer here:https://wordpress.stackexchange.com/a/139984/35907