-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40ea0a9
commit 9512c2e
Showing
8 changed files
with
254 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,7 @@ coverage/ | |
|
||
|
||
# logs | ||
*.log | ||
*.log | ||
|
||
# ignore agent.js | ||
samples/agent.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"semiColon": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shaka Player MSS Example</title> | ||
<!-- newrelic browser agent. REMEMBER TO REPLACE THIS SCRIPT WITH YOUR OWN BROWSER AGENT --> | ||
<script type="text/javascript" src="agent.js"></script> | ||
<!-- newrelic tracker --> | ||
<script src="../dist/newrelic-video-shaka.min.js"></script> | ||
<!-- shaka --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.11.2/shaka-player.compiled.js"></script> | ||
<!-- MSS support only with codem-isoboxer javaScript MP4 (MPEG-4, ISOBMFF) parser --> | ||
<script defer src="../node_modules/codem-isoboxer/dist/iso_boxer.min.js"></script> | ||
</head> | ||
<body> | ||
<video id="myPlayer" width="640" height="480" crossorigin="anonymous" controls autoplay></video> | ||
<script> | ||
async function initPlayer() { | ||
// Install polyfills. | ||
shaka.polyfill.installAll() | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shaka Player MSS Example</title> | ||
<!-- newrelic browser agent. REMEMBER TO REPLACE THIS SCRIPT WITH YOUR OWN BROWSER AGENT --> | ||
<script type="text/javascript" src="agent.js"></script> | ||
<!-- newrelic tracker --> | ||
<script src="../dist/newrelic-video-shaka.min.js"></script> | ||
<!-- shaka --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.11.2/shaka-player.compiled.js"></script> | ||
Check warning Code scanning / CodeQL Inclusion of functionality from an untrusted source Medium
Script loaded from content delivery network with no integrity check.
|
||
<!-- MSS support only with codem-isoboxer javaScript MP4 (MPEG-4, ISOBMFF) parser --> | ||
<script | ||
defer | ||
src="../node_modules/codem-isoboxer/dist/iso_boxer.min.js" | ||
></script> | ||
</head> | ||
<body> | ||
<video | ||
id="myPlayer" | ||
width="640" | ||
height="480" | ||
crossorigin="anonymous" | ||
controls | ||
autoplay | ||
></video> | ||
<script> | ||
async function initPlayer() { | ||
// Install polyfills. | ||
shaka.polyfill.installAll(); | ||
|
||
// Find the video element. | ||
var video = document.getElementById('myPlayer') | ||
// Find the video element. | ||
var video = document.getElementById('myPlayer'); | ||
|
||
// Construct a Player to wrap around it. | ||
var player = new shaka.Player(video); | ||
// Construct a Player to wrap around it. | ||
var player = new shaka.Player(video); | ||
|
||
// source | ||
var source = 'https://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest'; | ||
// source | ||
var source = | ||
'https://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest'; | ||
|
||
// Load the source into the Player. | ||
try { | ||
await player.load(source); | ||
// newrelic | ||
nrvideo.Core.addTracker(new nrvideo.ShakaTracker(player)); | ||
} catch (error) { | ||
nrvideo.Core.sendError(error) | ||
} | ||
} | ||
document.addEventListener('DOMContentLoaded', initPlayer) | ||
</script> | ||
</body> | ||
</html> | ||
// Load the source into the Player. | ||
try { | ||
await player.load(source); | ||
// newrelic | ||
nrvideo.Core.addTracker(new nrvideo.ShakaTracker(player)); | ||
} catch (error) { | ||
nrvideo.Core.sendError(error); | ||
} | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', initPlayer); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shaka HLS Player</title> | ||
<!-- newrelic browser agent. REMEMBER TO REPLACE THIS SCRIPT WITH YOUR OWN BROWSER AGENT --> | ||
<script type="text/javascript" src="agent.js"></script> | ||
|
||
<!-- newrelic tracker --> | ||
<script src="../dist/newrelic-video-shaka.min.js"></script> | ||
|
||
<!-- shaka --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.11.2/shaka-player.compiled.debug.min.js"></script> | ||
|
||
</head> | ||
<body> | ||
<video id="myPlayer" width="640" height="480" crossorigin="anonymous" controls></video> | ||
<script> | ||
async function initPlayer() { | ||
// Install polyfills. | ||
shaka.polyfill.installAll() | ||
|
||
// Find the video element. | ||
var video = document.getElementById('myPlayer') | ||
|
||
// Construct a Player to wrap around it. | ||
var player = new shaka.Player(video) | ||
|
||
// Attach the player to the window so that it can be easily debugged. | ||
// window.player = player | ||
|
||
// // source | ||
var source = 'http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8' | ||
|
||
// Load the source into the Player. | ||
try { | ||
window.player = player; | ||
await player.load(source); | ||
// newrelic | ||
nrvideo.Core.addTracker(new nrvideo.ShakaTracker(player)); | ||
} catch (e) { | ||
nrvideo.Core.sendError(error); | ||
} | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', initPlayer) | ||
</script> | ||
</body> | ||
<!-- newrelic browser agent. REMEMBER TO REPLACE THIS SCRIPT WITH YOUR OWN BROWSER AGENT --> | ||
<script type="text/javascript" src="agent.js"></script> | ||
|
||
<!-- newrelic tracker --> | ||
<script src="../dist/newrelic-video-shaka.min.js"></script> | ||
|
||
<!-- shaka --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.11.2/shaka-player.compiled.debug.min.js"></script> | ||
Check warning Code scanning / CodeQL Inclusion of functionality from an untrusted source Medium
Script loaded from content delivery network with no integrity check.
|
||
</head> | ||
<body> | ||
<video | ||
id="myPlayer" | ||
width="640" | ||
height="480" | ||
crossorigin="anonymous" | ||
controls | ||
></video> | ||
<script> | ||
async function initPlayer() { | ||
// Install polyfills. | ||
shaka.polyfill.installAll(); | ||
|
||
// Find the video element. | ||
var video = document.getElementById('myPlayer'); | ||
|
||
// Construct a Player to wrap around it. | ||
var player = new shaka.Player(video); | ||
|
||
// Attach the player to the window so that it can be easily debugged. | ||
// window.player = player | ||
|
||
// // source | ||
var source = 'http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8'; | ||
|
||
// Load the source into the Player. | ||
try { | ||
window.player = player; | ||
await player.load(source); | ||
// newrelic | ||
nrvideo.Core.addTracker(new nrvideo.ShakaTracker(player)); | ||
} catch (e) { | ||
nrvideo.Core.sendError(error); | ||
} | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', initPlayer); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.