Skip to content

Instantly share code, notes, and snippets.

@HeNy007
Created January 16, 2022 11:09
Show Gist options
  • Select an option

  • Save HeNy007/52f2908d94a4b56578ea511eaf17a8e0 to your computer and use it in GitHub Desktop.

Select an option

Save HeNy007/52f2908d94a4b56578ea511eaf17a8e0 to your computer and use it in GitHub Desktop.
Netflix skin for JWPlayer
<!--
Who doesn't love Netflix?
With this code you can utilize JW player and wrap my Netflix like skin around it including multi-audio multi-subtitle options.
This wrapper for JW Player works with the free (open source) and payed (licensed) version.
This is part of my project that archives all my tv shows and movies, the software will be released when it's stable.
This code is not final and is subjected to change and may break at any time.
Fixes and improvements are welcome.
Questions may be asked at stoney@nomercy.tv or @Stoney_Eagle
-->
<div id="133701" class="jwplayer nmplayer" tabindex="0" style=""></div>

Netflix skin for JWPlayer

Who doesn't love Netflix? With this code you can utilize JW player and wrap the Netflix like skin around it including multi-audio multi-subtitle options. This wrapper for JW Player works with the free (open source) and payed (licensed) version.

A Pen by Stoney_Eagle on CodePen.

License.

// The following is needed for this codepen to get a working license key
$.ajax({
url: "https://content.jwplatform.com/libraries/Jq6HIbgz.js",
success: function (result) {
const regex = /"key": "(?<key>.*)",/gm;
key = result.match(regex)[0];
key = key.replace('",', "").replace('"key": "', "");
create_licensed_player(key);
}
});
// Base
var player = jwplayer("133701");
var nmplayer = nmplayer("133701");
// Open source example.
function create_opensource_player() {
nmplayer.setup({
jwplayerInstance: player,
jwplayerSetup: {
playlist: "https://cdn.nomercy.tv/playlists/85324.json"
// any jwplayer.defaults.js override e.g.
}
});
}
// Licensed example
function create_licensed_player(key) {
nmplayer.setup({
jwplayerInstance: player, // Import the jwplayer instance.
jwplayerSetup: {
playlist: "https://cdn.nomercy.tv/playlists/85324.json",
key: key,
controls: false
// any jwplayer.defaults.js override e.g: repeat: true
}
});
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://cdn.nomercy.tv/js/jwplayer.licensed/jwplayer.js"></script>
<script src="https://cdn.nomercy.tv/js/jwplayer/jwplayer.defaults.js"></script>
<script src="https://cdn.nomercy.tv/js/jwplayer/nmplayer.jwplayer.js"></script>
body {
background: black;
}
.jwplayer.jw-flag-aspect-mode {
height: 100vh !important;
max-height: 100vh;
}
#overlay {
height: 100% !important;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet" />
<link href="https://cdn.nomercy.tv/css/nmplayer.jwplayer.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.4.6/tailwind.min.css" rel="stylesheet" />
@sagar-anmol
Copy link
Copy Markdown

can you please add forward and backword seek on right and left click please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment