Skip to content
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

Tracker Implementation with latest library of Dash.js #1

Merged
merged 9 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
13 changes: 13 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "standard",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["standard"],
"globals": {
"newrelic": true,
"nrvideo": true,
"dash": true
}
}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.DS_Store
*.swp
*.swo
*.orig
.idea
ext/
.vscode

# Dependencies
node_modules
bower_components

# temp and output
dist/
coverage/
.nyc_output
*.zip

# logs
*.log
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## [0.1.0] -

- First Version
mlychndnnr marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# CONTRIBUTING

## Code Standards
This project follows [Standard Javascript](https://standardjs.com/) specifications.

The changelog format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### Eslint & Standard
Use eslint to help you maintain code standards:
```bash
npm install -g standard
```

## NPM Commands
Remember to run `npm install` the first time.

Run `npm run build` to build the solution. You can find the output inside `dist` folder.

Run `npm run watch` to watch the files inside `src` and run a build everytime a file is changed.

Use `build:dev` and `watch:dev` to generate human-readable dist files.

Use `npm run test` to run tests and coverage.

Use `npm run doc` to generate documentation page.

Use `npm run zip` to generate a deployable zip file. Its password will be `newrelic`.

Use `npm run clean` to clear any generated files.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we run this in docker?

119 changes: 119 additions & 0 deletions EULA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# FIT Instrumentation End User License Agreement
NEW RELIC, INC. FIT INSTRUMENTATION END USER LICENSE AGREEMENT In connection
with the work provided by New Relic’s Field Instrumentation Team, you may be
provided with certain custom-created software to enable, optimize, or enhance
your use of New Relic’s Services. By downloading, installing, authorizing
installation, or using the FIT Instrumentation with your Underlying Software
(defined below), you (“Customer”) agree to the terms and conditions herein
(“Agreement”) with New Relic, Inc., a Delaware corporation with offices located
at 188 Spear Street, Suite 1200 San Francisco, CA 94105 (“New Relic”),
(collectively the “Parties”). Capitalized terms not defined herein shall have
the meanings set forth in the New Relic Terms of Service (the “Terms of
Service”) available here: http://newrelic.com/terms
IF YOU DO NOT AGREE TO THIS AGREEMENT, PLEASE DO NOT USE THE FIT INSTRUMENTATION.
1. DEFINITIONS
“FIT Instrumentation” means the New Relic custom-made software,
including but not limited to connectors, extensions, and plugins, provided by
New Relic to Customer to enable the Services to operate with certain third party
or Customer software or systems (“Underlying Software”). For the purposes of the
Terms of Service, the FIT Instrumentation shall be treated like an Agent,
subject to the separate terms herein.
2. USE OF THE FIT INSTRUMENTATION
2.1 Software Evaluation License. Subject to the terms herein, New Relic grants
to Customer a limited, non-exclusive, non-transferrable, non-sublicensable right
to install, use, and configure the FIT Instrumentation solely as needed to
enable the Services for internal evaluation purposes. New Relic reserves all
rights and licenses not expressly granted herein.
2.2 Ownership. As between the Parties, New Relic owns all right, title, and
interest to the FIT Instrumentation and Feedback, including but not limited to
any intellectual property and proprietary rights therein. Customer retains all
right, title, and interest in any Customer Data processed by the FIT
Instrumentation in connection with the Services.
2.3 Feedback. Customer agrees to provide feedback, suggestions, ideas, requests
or recommendations (“Feedback”) regarding the FIT Instrumentation, and hereby
irrevocably assigns all intellectual property and proprietary rights it holds in
the Feedback to New Relic.
2.4 Notice. Customer acknowledges and agrees that the FIT Instrumentation is
made to work with the Underlying Software as configured at the time of creation
and there is no guarantee that FIT Instrumentation will continue to work in the
event Customer changes, replaces, upgrades versions of, updates, or otherwise
changes the Underlying Software (an “Upgrade Event”). Customer shall hold New
Relic harmless from any claims or damages arising from Customer’s Upgrade Event.
2.5 Restrictions. Customer will not: (i) use the FIT Instrumentation except as
permitted hereunder; (ii) distribute, sell, sublicense, or otherwise transfer
the FIT Instrumentation; (iii) decompile, disassemble or reverse engineer any
software underlying the FIT Instrumentation; (iv) use the FIT Instrumentation
intending to damage, disable, overburden or impair any New Relic server or
network(s) connected to any New Relic server or interfere with any other party’s
use and enjoyment of the Services; (v) use the FIT Instrumentation to defraud,
defame, abuse, harass, stalk, threaten or infringe the rights of privacy or
other intellectual property rights of others or otherwise violate any applicable
law; (vi) circumvent or modify any security technologies included as part of the
FIT Instrumentation; or (vii) attempt or permit any third party to do any of the
foregoing. New Relic may suspend usage of the Services by any user, without
notice, pending any investigation of misuse.
3. CONFIDENTIALITY
3.1 Definition. “Confidential Information” means: (a) the FIT Instrumentation,
and any features, results or output produced by, and other information relating
to the FIT Instrumentation (including, without limitation, all Feedback); and
(b) any business or technical information of New Relic including but not limited
to any technical information, research, development, know-how that a reasonable
person would understand to be confidential.
3.2 Restrictions. Customer will not use or disclose any Confidential
Information, except as necessary for the performance of this Agreement. Customer
will use all reasonable efforts to protect Confidential Information from
unauthorized use or disclosure, but in no event less than the efforts that it
ordinarily uses with respect to its own proprietary information. Customer may
disclose Confidential Information to those of its employees who have a bona fide
need to know such Confidential Information for the performance of this
Agreement; provided that each such employee first executes a written agreement
that contains use and nondisclosure restrictions at least as protective as those
set forth herein. Confidential Information shall not include any information
that: (a) is or becomes generally known to the public through no fault or breach
of this Agreement by Customer; (b) is rightfully known by Customer at the time
of disclosure without an obligation of confidentiality; (c) is independently
developed by Customer without access or use of any Confidential Information; or
(d) is rightfully obtained from a third party without restriction on use or
disclosure.
4. DISCLAIMER
4.1 DISCLAIMER. FIT INSTRUMENTATION IS PROVIDED AS-IS AND AS-AVAILABLE AND NEW
RELIC DISCLAIMS AND MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING
ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
TITLE OR NON-INFRINGEMENT AND WHETHER OR NOT ARISING THROUGH A COURSE OF
DEALING. FIT INSTRUMENTATION IS NOT GUARANTEED TO BE ERROR-FREE, COMPATIBLE WITH
THE UNDERLYING SOFTWARE. , OR THAT CUSTOMER WILL ACHIEVE ANY RESULTS FROM USE OF
THE FIT INSTRUMENTATION THEREFROM. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
OF IMPLIED WARRANTIES OR LIMITATIONS ON APPLICABLE STATUTORY RIGHTS OF A
CONSUMER, SO THE ABOVE EXCLUSION AND LIMITATIONS MAY NOT APPLY TO THE CUSTOMER.
4.2 LIMITATION OF LIABILITY. IN NO EVENT WILL NEW RELIC BE LIABLE TO CUSTOMER OR
ANY THIRD PARTY FOR DAMAGES OF ANY KIND, INCLUDING, WITHOUT LIMITATION, DIRECT,
SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES (INCLUDING LOSS OF USE,
DATA, BUSINESS, OR PROFITS) ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT
OR THE INSTALLATION, USE OR INABILITY TO USE THE FIT INSTRUMENTATION OR FOR ANY
ERROR OR DEFECT IN THE FIT INSTRUMENTATION OR THE SERVICES, WHETHER SUCH
LIABILITY ARISES FROM ANY CLAIM BASED UPON CONTRACT, WARRANTY, TORT, STRICT
LIABILITY, OR OTHERWISE, WHETHER OR NOT NEW RELIC HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH LOSS OR DAMAGE. THE PARTIES HAVE AGREED THAT THESE
LIMITATIONS WILL SURVIVE AND APPLY EVEN IF ANY LIMITED REMEDY SPECIFIED IN THIS
AGREEMENT IS FOUND TO HAVE FAILED OF ITS ESSENTIAL PURPOSE.
4.3 EVALUATION VERSION. Customer agrees and acknowledges that: (a) the FIT
Instrumentation is not an official product and has not been commercially
released for sale by New Relic; (b) the FIT Instrumentation may not operate
properly, being in final form, or fully functional; (c) the FIT Instrumentation
may contain errors, security vulnerabilities, design flaws, or other problems;
(d) it may not be possible to make the FIT Instrumentation fully functional; (e)
the information obtained using the FIT Instrumentation may not be accurate; (f)
use of the FIT Instrumentation may result in unexpected results, loss of data,
delays or other unpredictable damages or loss; (g) New Relic is under no
obligation to release a commercial version of the FIT Instrumentation; and (h)
New Relic has the right unilaterally to abandon development of the FIT
Instrumentation, at any time and without any obligation or liability to
Customer.
5. GENERAL PROVISIONS
5.1 Terms of Service. This Agreement and the Terms of Service constitute the
entire and exclusive agreement between New Relic and Customer with respect to
the FIT Instrumentation. To the extent of a conflict between the Agreement and
the Terms of Service, this Agreement shall govern with respect to the FIT
Instrumentation only.
//
If you need additional help, get support at support.newrelic.com.
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# video-dash-js
[![New Relic Experimental header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Experimental.png)](https://opensource.newrelic.com/oss-category/#new-relic-experimental)

# New Relic Dash Tracker

New Relic video tracking for Dash Player.

## Requirements

This video monitor solutions works on top of New Relic's **Browser Agent**.

## Build

Install dependencies:

```
$ npm install
```

And build:

```
$ npm run build:dev
```

Or if you need a production build:

```
$ npm run build
```

## Usage

Load **scripts** inside `dist` folder into your page.

```html
<script src="../dist/newrelic-video-dash.min.js"></script>
```

```javascript
nrvideo.Core.addTracker(new nrvideo.DashTracker(player));
```

## Support

New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.

We encourage you to bring your experiences and questions to the [Explorers Hub](https://discuss.newrelic.com) where our community members collaborate on solutions and new ideas.

## Contributing

We encourage your contributions to improve New Relic Dash Tracker! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].

**A note about vulnerabilities**

As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [our bug bounty program](https://docs.newrelic.com/docs/security/security-privacy/information-security/report-security-vulnerabilities/).

## License

New Relic Dash Tracker is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.

## Release

- Create a PR.
- Once approved, Update the package version according to the semver rules.
- Update the CHANGELOG in the repo (all web repos have a changelog file).
- Create a github tag with the version.
4 changes: 4 additions & 0 deletions babel.config.js
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"],
};
10 changes: 10 additions & 0 deletions jest.config.js
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)"],
};
Loading
Loading