-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NR-320035- Updating Video-Shaka-Js #10
Merged
asllop
merged 5 commits into
newrelic:master
from
rajeevkumar-nr:NR-320035-updating-shaka-tracker
Oct 7, 2024
+8,042
−4,315
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ebb38f2
NR-320035- Updating Video Shaka Js to run sample app
rajeevkumar-nr d0635c3
NR-320035-Remove unwanted code and added comments
rajeevkumar-nr f286664
NR-320035-updated Tracker version and change log
rajeevkumar-nr 3c73af6
NR-320035-updated date in changelg.md
rajeevkumar-nr dbf3c29
NR-320035-updated CHANGELOG.md
rajeevkumar-nr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"presets": ["env"] | ||
} | ||
"presets": [ | ||
"@babel/preset-env" | ||
], | ||
"plugins": ["@babel/plugin-transform-modules-commonjs"] | ||
} |
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 @@ | ||
module.exports = { | ||
presets: ["@babel/preset-env"], | ||
plugins: ["@babel/plugin-transform-modules-commonjs"], | ||
}; |
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,10 @@ | ||
module.exports = { | ||
testEnvironment: "node", | ||
moduleFileExtensions: ["js", "jsx"], | ||
transform: { | ||
"^.+\\.jsx?$": "babel-jest", | ||
}, | ||
transformIgnorePatterns: ["node_modules/(?!@shotgunjed)/"], | ||
|
||
testMatch: ["**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)"], | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,44 @@ | ||
<!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/2.2.1/shaka-player.compiled.debug.js"></script> | ||
<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> | ||
<video id="myPlayer" width="640" height="480" crossorigin="anonymous" controls autoplay></video> | ||
<script> | ||
function initPlayer() { | ||
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 | ||
var player = new shaka.Player(video); | ||
|
||
// source | ||
var source = 'https://storage.googleapis.com/shaka-demo-assets/angel-one-hls/master.m3u8' | ||
|
||
// newrelic | ||
nrvideo.Core.addTracker(new nrvideo.ShakaTracker(player)) | ||
var source = 'https://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest'; | ||
|
||
// Load the source into the Player. | ||
player.load(source).catch(function(error) { | ||
nrvideo.Core.sendError(error) | ||
}) | ||
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> | ||
</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
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,6 +1,5 @@ | ||
import * as nrvideo from 'newrelic-video-core' | ||
import Tracker from './tracker' | ||
import * as nrvideo from 'newrelic-video-core'; | ||
import Tracker from "./tracker"; | ||
|
||
nrvideo.ShakaTracker = Tracker | ||
|
||
module.exports = nrvideo | ||
module.exports = nrvideo; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the functions to separate js file