
external config file for a uniform player
Im trying to read if its possible to separate the playerInstance.setup() values.. to attain a uniform look of the player all over the site sirs?
Right now, I have this script embedded..
<script type="text/javascript" src="scripts/js/jwplayer/jwplayer.js"></script>
<script type="text/javascript" src="scripts/js/jwplayer.config.js"></script>
<script>
var playerInstance = jwplayer("MyVideo);
playerInstance.setup({
file: "tour-videos/movie-file.mp4",
image: "images/covers@320/movie-file.jpg",
width: "100%",
aspectratio: "16:9",
mediaid: '123456'
});
</script>
To explain further, I have exteranl jwplayer.config.js, which is at the moment.. only contains the jwplayer.key
But I would like to include there the other aspects of the player.. I mean the setup of the player.. instead of
writing a whole .setup.. which ofcourse will be repetitive all over the site.. that is what I want to eliminate..
So that in the end.. I will only have to write in the setup is the file directory.. and the image directory of the video..
is this possible..
To get a better understading sirs.. its kinda like this..
******************** this will be in the external file ******************************
config for all of the player in the site.. including skins.. etc etc..
for uniformity..
<script>
playerInstance.setup({
width: "100%",
aspectratio: "16:9",
mediaid: '123456'
});
</script>
******************** this will be in the external file ******************************
******************** this will be embedded on the page******************************
<script>
var playerInstance = jwplayer("MyVideo);
playerInstance.setup({
file: "tour-videos/movie-file.mp4",
image: "images/covers@320/movie-file.jpg",
});
</script>
******************** this will be embedded on the page******************************
I am leaning on this solution.. cause.. we have static pages that have unique videos.. diffrent
from one another.. so that it will easier to maintain..