Skip to content

Instantly share code, notes, and snippets.

@superman-enamy
Created July 18, 2024 13:06
Show Gist options
  • Select an option

  • Save superman-enamy/a9a6417ec1de3ad5898a9a8700afecb0 to your computer and use it in GitHub Desktop.

Select an option

Save superman-enamy/a9a6417ec1de3ad5898a9a8700afecb0 to your computer and use it in GitHub Desktop.
xxdQPdY
<div id="myElement"></div>
var playerInstance = jwplayer("myElement");
playerInstance.setup({
playlist: [{
sources: [{
file: "https://sony247channels.akamaized.net/hls/live/2011670-b/SonyMaxhd/master.m3u8?hdnea=exp=1628425251~acl=/*~id=93405551254318606669692731569358~hmac=258e4683e9981607f35788a634a95aa8b7c4c84188d3105d6b22f544b44ec848",
onXhrOpen: function(xhr, url) {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('x-via-device', 'true');
xhr.setRequestHeader('app_version', '3.2.30');
xhr.setRequestHeader('security_token', 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjg0MjQ5NjksImV4cCI6MTYyOTcyMDk2OSwiYXVkIjoiKi5zb255bGl2LmNvbSIsImlzcyI6IlNvbnlMSVYiLCJzdWIiOiJzb21lQHNldGluZGlhLmNvbSJ9.Bvjeb8j7t2rPb6JAUQTZRG0jv7bc1plMt6ukn9oSOziLAwvsOD6QHjhaZScIe1zsyz1jfmyoY_4GAc81PBgMVdkfP_F6S1UwUvcV4ydLLOFnKEHHPEQFwTZ2ipl8RA8bmXGFXUhgVnBz48R9GV6K0Q9-SK_lqX8ovv5bN0StaZC5kBMogzq7vO1L3VyJUWtoFDLXzeeasMPcsV9ekYnudhl2gO3pKEWBT0iMYffHAk6l1IGOYsbukCxyEcntNPwXdwyWBXSi3MR1DZqJGAF6ZfZOb5k_t381E0FPeIW_X2aJuX6zQ1tuqA4IQ4Lw1l2qQpwX9nkdfDtZkY76Ew7CEjVEHN8s9DcgysEWE2huGgDlbqo7AzlXBbciZbuwKXlHylZC3dxfm8NGPzZnH1nRzXmz_hTQ4VRMcRmvrxWO7x5p1cIJ_eCi7g1Yyxc3FVA04vsrbUgZRAavxhiB2c3Midgac0pF2I8jpeak3VtSdJ2PVak2dDuES1Aggvw6qNcxsL8qRopmaVyCHgYKC3HfWldIo2AYEGffTLgUoMizVJabCN43ifNzikmtPAOBIUyCjDscTXpe_WDYNPM6Xv_3tbQlYwiSs884CyjuMRmDsmpGhLvpt3hSHvnTqz_oZfVxqNQp0fxXYBqnGLSdMa8hapAxvinsxsmKmMAKrNvE9bY');
xhr.setRequestHeader('x-playback-session-id', '2a575b9cb995463f803ff53eadeb8148-1628425018892.9573');
},
type: "hls"
}],
image: "//content.jwplatform.com/thumbs/HQzagMgW-720.jpg",
title: "JW Player Support Demo",
description: "An example video embed."
}],
width: 640,
height: 360,
mute: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment