This is a handy little program that converts zipped JW Player 5 XML/PNG skins into a single self-contained JavaScript file.

To use a skin for HTML5 mode, you normally have to unzip it and upload the XML and all the PNG images to the same location as the ZIP.

This can be problematic if you're hosting the skin on a different domain (e.g. a CDN) because JavaScript is restricted from loading content on other domains.

Python 2.7 is required.


python jwskin2js.py [-h] [-o jsfile] zipfile

Compile a JW Player 5 skin to JavaScript.

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  -o jsfile, --output jsfile

Include in your page like so:

<div id="player">Loading the player...</div>
<script type="text/javascript" src="http://s3.example.com/js/jwplayer.js"></script>
<script type="text/javascript" src="http://s3.example.com/skins/glow.js"></script>
<script type="text/javascript">
        modes: [{
            type: 'flash',
            src: 'http://s3.example.com/js/player.swf',
            config: {skin: 'http://s3.example.com/skins/glow.zip'}
            type: 'html5',
            config: {skin: ''}
        file: 'http://s3.example.com/video.mp4',
        width: 640,
        height: 360


You still need to include the ZIP skin for it to work in Flash mode.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.