Giter Club home page Giter Club logo

video-core-js's Introduction

Community Project header

New Relic Video Core - JavaScript

The New Relic video tracking core library is the base for all video trackers in the browser platform. It contains the classes and core mechanisms used by the player specific trackers.

Build

Install dependencies:

$ npm install

And build:

$ npm run build:dev

Or if you need a production build:

$ npm run build

Usage

Add scripts inside dist folder to your page.

If you want to know how to generate dist folder, refer to npm commands section.

Registering Trackers

nrvideo provides a class called VideoTracker that will serve as an interface with Browser Agent, allowing you to manage and send events to New Relic.

First of all, you have to add a tracker in the core class:

// var nrvideo = require('newrelic-video-core')
var tracker = new nrvideo.VideoTracker()
nrvideo.Core.addTracker(tracker)

From this point, any event emitted by said tracker will be reported to New Relic:

tracker.send('EVENT', { data: 1 })

Of course, you may want to use built-in events for video. Luckily for you, this core library provides an easy way of sending video-related content, using tracker.sendXXXXX methods.

tracker.sendRequest() // Will send CONTENT_REQUEST

Search for Tracker#sendXXXX events in the documentation to read more about it.

Documentation

All classes are documented using autodocs. The documents, generated with jsdoc, can be found in the documentation directory of the current repo.

Open source license

This project is distributed under the Apache 2 license.

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 where our community members collaborate on solutions and new ideas.

Community

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/t/video-core-js-tracker/100303

Issues / enhancement requests

Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue.

Contributing

Contributions are encouraged! If you submit an enhancement request, we'll invite you to contribute the change yourself. Please review our Contributors Guide.

Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. If you'd like to execute our corporate CLA, or if you have any questions, please drop us an email at [email protected].

video-core-js's People

Contributors

asllop avatar adwetzelnr avatar boubalou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.