@newrelic/video-videojs 3.0.2 → 3.2.0-beta-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -4
- package/LICENSE.txt +1 -1
- package/README.md +55 -13
- package/THIRD_PARTY_NOTICES.md +28 -54
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.LICENSE.txt +4 -2
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.LICENSE.txt +4 -2
- package/dist/esm/index.js.map +1 -0
- package/dist/umd/newrelic-video-videojs.min.js +3 -0
- package/dist/umd/newrelic-video-videojs.min.js.LICENSE.txt +8 -0
- package/dist/umd/newrelic-video-videojs.min.js.map +1 -0
- package/package.json +8 -7
- package/src/ads/brightcove-ima.js +90 -0
- package/src/ads/freewheel.js +70 -0
- package/src/ads/ima.js +248 -0
- package/src/ads/videojs-ads.js +145 -0
- package/src/index.js +2 -0
- package/src/register-plugin.js +19 -0
- package/src/techs/contrib-hls.js +45 -0
- package/src/techs/hls-js.js +45 -0
- package/src/techs/shaka.js +49 -0
- package/src/tracker.js +335 -0
- package/dist/umd/videojs.min.js +0 -1
- package/dist/umd/videojs.min.js.LICENSE.txt +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
-
## [3.
|
|
3
|
+
## [3.1.1] - 2025-05-28
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **Standalone Agent:** This tracker now operates independently with its own authorization details, removing the dependency on a browser agent.
|
|
8
|
+
|
|
9
|
+
## [3.1.0] - 2025-05-27
|
|
4
10
|
|
|
5
11
|
### Enhancements
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
- **Publishing to npm:** The package can now be published to npm, making it easily accessible.
|
|
8
14
|
|
|
9
15
|
### Build
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
- **Distribution Formats:** Added `cjs`, `esm`, and `umd` builds to the `dist` folder, ensuring compatibility with CommonJS, ES Modules, and UMD module formats.
|
|
12
18
|
|
|
13
|
-
## [3.0.1] - 2025
|
|
19
|
+
## [3.0.1] - 2025-04-24
|
|
14
20
|
|
|
15
21
|
### Bug Fixes
|
|
16
22
|
|
|
17
23
|
- Resolved an issue where custom attribute definitions were not accepting options as arguments.
|
|
24
|
+
- **Update:** The `errorName` attribute has been deprecated and `errorMessage` is introduced as its replacement.
|
|
18
25
|
|
|
19
26
|
## [3.0.0] - 2025/02/20
|
|
20
27
|
|
package/LICENSE.txt
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright New Relic, Inc. All rights reserved.
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# New Relic Videojs Tracker Agent
|
|
4
4
|
|
|
5
|
+
> **⚠️ DISCLAIMER: This is a beta version. Features and APIs may change in future releases.**
|
|
6
|
+
|
|
5
7
|
The New Relic Videojs Tracker enhances your media applications by tracking video events, playback errors, and other activities, providing comprehensive insights into performance and user interactions.
|
|
6
8
|
|
|
7
9
|
- The Videojs tracker is available as a ready-to-use JavaScript snippet for easy copy-paste integration.
|
|
8
10
|
- New Relic Videojs tracker auto-detects events emitted by Videojs Player.
|
|
9
|
-
-
|
|
11
|
+
- **Important**: You must provide New Relic credentials in the options object when instantiating the tracker.
|
|
10
12
|
- For questions and feedback on this package, please visit the [Explorer's Hub](https://discuss.newrelic.com), New Relic's community support forum.
|
|
11
13
|
- Looking to contribute to the Player Name agent code base? See [DEVELOPING.md](./DEVELOPING.md) for instructions on building and testing the browser agent library, and Contributors.
|
|
12
14
|
|
|
@@ -36,25 +38,52 @@ To integrate New Relic Tracker Agent into your web application effectively, you'
|
|
|
36
38
|
To make the tracker available to your application, install via [NPM](https://docs.npmjs.com/cli/v8/commands/npm-install) or [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/).
|
|
37
39
|
|
|
38
40
|
```shell
|
|
39
|
-
$ npm install @newrelic/video-videojs
|
|
41
|
+
$ npm install @newrelic/video-videojs@3.2.0-beta-1
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
```shell
|
|
43
|
-
$ yarn add @newrelic/video-videojs
|
|
45
|
+
$ yarn add @newrelic/video-videojs@3.2.0-beta-1
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
## Instantiating the Videojs Tracker
|
|
47
49
|
|
|
50
|
+
**Important**: When instantiating the VideojsTracker, you must provide New Relic credentials through the options object. This is a mandatory step:
|
|
51
|
+
|
|
48
52
|
```javascript
|
|
53
|
+
import VideojsTracker from '@newrelic/video-videojs';
|
|
54
|
+
|
|
55
|
+
// Initialize the video player
|
|
56
|
+
var player = videojs('my-video');
|
|
57
|
+
|
|
58
|
+
// Configure New Relic credentials (MANDATORY)
|
|
59
|
+
const options = {
|
|
60
|
+
info: {
|
|
61
|
+
beacon: 'xxxxxxxxxx',
|
|
62
|
+
errorBeacon: 'xxxxxxxxx',
|
|
63
|
+
licenseKey: 'xxxxxxxxxxx',
|
|
64
|
+
applicationID: 'xxxxxxxx',
|
|
65
|
+
sa: 1,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
49
68
|
|
|
50
|
-
|
|
69
|
+
// Create the tracker with required credentials
|
|
70
|
+
const tracker = new VideojsTracker(player, options);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Additional Configuration Options
|
|
51
74
|
|
|
52
|
-
|
|
53
|
-
player.version = videojs.VERSION
|
|
54
|
-
const tracker = new VideojsTracker(player);
|
|
75
|
+
You can also include custom data along with the required credentials:
|
|
55
76
|
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
```javascript
|
|
78
|
+
// For setting custom attributes
|
|
79
|
+
const tracker = new VideojsTracker(player, {
|
|
80
|
+
info: {
|
|
81
|
+
beacon: 'xxxxxxxxxx',
|
|
82
|
+
errorBeacon: 'xxxxxxxxx',
|
|
83
|
+
licenseKey: 'xxxxxxxxxxx',
|
|
84
|
+
applicationID: 'xxxxxxxx',
|
|
85
|
+
sa: 1,
|
|
86
|
+
},
|
|
58
87
|
customData: {
|
|
59
88
|
contentTitle: 'Override Existing Title',
|
|
60
89
|
customPlayerName: 'myGreatPlayer',
|
|
@@ -66,8 +95,7 @@ const tracker = new VideojsjsTracker(player, {
|
|
|
66
95
|
tracker.setUserId('userId');
|
|
67
96
|
|
|
68
97
|
// For Sending custom Action with Attributes
|
|
69
|
-
|
|
70
|
-
const tracker = new nrvideo.VideojsTracker(player);
|
|
98
|
+
const tracker = new nrvideo.VideojsTracker(player, options);
|
|
71
99
|
|
|
72
100
|
nrvideo.Core.addTracker(tracker);
|
|
73
101
|
|
|
@@ -77,6 +105,19 @@ tracker.sendCustom('CUSTOM_ACTION', 'state time', {
|
|
|
77
105
|
});
|
|
78
106
|
```
|
|
79
107
|
|
|
108
|
+
### Obtaining New Relic Credentials
|
|
109
|
+
|
|
110
|
+
To get your New Relic credentials:
|
|
111
|
+
|
|
112
|
+
1. Log into your New Relic account
|
|
113
|
+
2. Navigate to your Browser application settings
|
|
114
|
+
3. Copy the required values:
|
|
115
|
+
- `beacon`: Your data collection endpoint
|
|
116
|
+
- `errorBeacon`: Your error collection endpoint
|
|
117
|
+
- `licenseKey`: Your license key
|
|
118
|
+
- `applicationID`: Your application ID
|
|
119
|
+
- `sa`: Account ID
|
|
120
|
+
|
|
80
121
|
## Data Model
|
|
81
122
|
|
|
82
123
|
To understand which actions and attributes are captured and emitted by the Videojs Player under different event types, see [DataModel.md](./DATAMODEL.md).
|
|
@@ -97,6 +138,7 @@ As noted in our [security policy](../../security/policy), New Relic is committed
|
|
|
97
138
|
|
|
98
139
|
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/).
|
|
99
140
|
|
|
100
|
-
|
|
141
|
+
# License
|
|
101
142
|
|
|
102
|
-
|
|
143
|
+
This project is distributed under the [Apache 2.0](https://apache.org/licenses/LICENSE-2.0.txt) License.
|
|
144
|
+
The video-core also uses source code from third-party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the [third-party notices document](THIRD_PARTY_NOTICES.md).
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -14,7 +14,7 @@ code, the source code can be found at [https://github.com/newrelic/video-videojs
|
|
|
14
14
|
|
|
15
15
|
**[dependencies](#dependencies)**
|
|
16
16
|
|
|
17
|
-
* [@
|
|
17
|
+
* [@newrelic/video-core](#newrelicvideo-core)
|
|
18
18
|
|
|
19
19
|
**[devDependencies](#devDependencies)**
|
|
20
20
|
|
|
@@ -26,7 +26,6 @@ code, the source code can be found at [https://github.com/newrelic/video-videojs
|
|
|
26
26
|
* [babel-loader](#babel-loader)
|
|
27
27
|
* [videojs-ima](#videojs-ima)
|
|
28
28
|
* [webpack-cli](#webpack-cli)
|
|
29
|
-
* [webpack-obfuscator](#webpack-obfuscator)
|
|
30
29
|
* [webpack](#webpack)
|
|
31
30
|
|
|
32
31
|
**[optionalDependencies](#optionalDependencies)**
|
|
@@ -35,9 +34,9 @@ code, the source code can be found at [https://github.com/newrelic/video-videojs
|
|
|
35
34
|
|
|
36
35
|
## dependencies
|
|
37
36
|
|
|
38
|
-
### @
|
|
37
|
+
### @newrelic/video-core
|
|
39
38
|
|
|
40
|
-
This product includes source derived from [@
|
|
39
|
+
This product includes source derived from [@newrelic/video-core](https://github.com/newrelic/video-core-js) ([v3.2.0-beta-1](https://github.com/newrelic/video-core-js/tree/v3.2.0-beta-1)), distributed under the [Apache-2.0 License](https://github.com/newrelic/video-core-js/blob/v3.2.0-beta-1/LICENSE):
|
|
41
40
|
|
|
42
41
|
```
|
|
43
42
|
Apache License
|
|
@@ -228,7 +227,7 @@ This product includes source derived from [@rajeev-kumar/video-core](https://git
|
|
|
228
227
|
same "printed page" as the copyright notice for easier
|
|
229
228
|
identification within third-party archives.
|
|
230
229
|
|
|
231
|
-
Copyright
|
|
230
|
+
Copyright New Relic, Inc. All rights reserved.
|
|
232
231
|
|
|
233
232
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
234
233
|
you may not use this file except in compliance with the License.
|
|
@@ -241,7 +240,6 @@ This product includes source derived from [@rajeev-kumar/video-core](https://git
|
|
|
241
240
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
242
241
|
See the License for the specific language governing permissions and
|
|
243
242
|
limitations under the License.
|
|
244
|
-
|
|
245
243
|
```
|
|
246
244
|
|
|
247
245
|
|
|
@@ -249,7 +247,7 @@ This product includes source derived from [@rajeev-kumar/video-core](https://git
|
|
|
249
247
|
|
|
250
248
|
### @babel/core
|
|
251
249
|
|
|
252
|
-
This product includes source derived from [@babel/core](https://github.com/babel/babel) ([v7.
|
|
250
|
+
This product includes source derived from [@babel/core](https://github.com/babel/babel) ([v7.28.0](https://github.com/babel/babel/tree/v7.28.0)), distributed under the [MIT License](https://github.com/babel/babel/blob/v7.28.0/LICENSE):
|
|
253
251
|
|
|
254
252
|
```
|
|
255
253
|
MIT License
|
|
@@ -279,7 +277,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
279
277
|
|
|
280
278
|
### @babel/plugin-transform-modules-commonjs
|
|
281
279
|
|
|
282
|
-
This product includes source derived from [@babel/plugin-transform-modules-commonjs](https://github.com/babel/babel) ([v7.
|
|
280
|
+
This product includes source derived from [@babel/plugin-transform-modules-commonjs](https://github.com/babel/babel) ([v7.27.1](https://github.com/babel/babel/tree/v7.27.1)), distributed under the [MIT License](https://github.com/babel/babel/blob/v7.27.1/LICENSE):
|
|
283
281
|
|
|
284
282
|
```
|
|
285
283
|
MIT License
|
|
@@ -309,7 +307,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
309
307
|
|
|
310
308
|
### @babel/preset-env
|
|
311
309
|
|
|
312
|
-
This product includes source derived from [@babel/preset-env](https://github.com/babel/babel) ([v7.
|
|
310
|
+
This product includes source derived from [@babel/preset-env](https://github.com/babel/babel) ([v7.28.0](https://github.com/babel/babel/tree/v7.28.0)), distributed under the [MIT License](https://github.com/babel/babel/blob/v7.28.0/LICENSE):
|
|
313
311
|
|
|
314
312
|
```
|
|
315
313
|
MIT License
|
|
@@ -547,7 +545,7 @@ This product includes source derived from [@newrelic/newrelic-oss-cli](https://g
|
|
|
547
545
|
|
|
548
546
|
### aws-sdk
|
|
549
547
|
|
|
550
|
-
This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.
|
|
548
|
+
This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1692.0](https://github.com/aws/aws-sdk-js/tree/v2.1692.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1692.0/LICENSE.txt):
|
|
551
549
|
|
|
552
550
|
```
|
|
553
551
|
|
|
@@ -757,7 +755,7 @@ This product includes source derived from [aws-sdk](https://github.com/aws/aws-s
|
|
|
757
755
|
|
|
758
756
|
### babel-loader
|
|
759
757
|
|
|
760
|
-
This product includes source derived from [babel-loader](https://github.com/babel/babel-loader) ([v9.1
|
|
758
|
+
This product includes source derived from [babel-loader](https://github.com/babel/babel-loader) ([v9.2.1](https://github.com/babel/babel-loader/tree/v9.2.1)), distributed under the [MIT License](https://github.com/babel/babel-loader/blob/v9.2.1/LICENSE):
|
|
761
759
|
|
|
762
760
|
```
|
|
763
761
|
Copyright (c) 2014-2019 Luís Couto <hello@luiscouto.pt>
|
|
@@ -996,58 +994,34 @@ This product includes source derived from [videojs-ima](https://github.com/googl
|
|
|
996
994
|
|
|
997
995
|
### webpack-cli
|
|
998
996
|
|
|
999
|
-
This product includes source derived from [webpack-cli](https://github.com/webpack/webpack-cli) ([v4.
|
|
1000
|
-
|
|
1001
|
-
```
|
|
1002
|
-
MIT License
|
|
1003
|
-
|
|
1004
|
-
Copyright (c) <year> <copyright holders>
|
|
1005
|
-
|
|
1006
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
1007
|
-
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
1008
|
-
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1009
|
-
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
1010
|
-
following conditions:
|
|
1011
|
-
|
|
1012
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
1013
|
-
portions of the Software.
|
|
997
|
+
This product includes source derived from [webpack-cli](https://github.com/webpack/webpack-cli) ([v4.10.0](https://github.com/webpack/webpack-cli/tree/v4.10.0)), distributed under the [MIT License](https://github.com/webpack/webpack-cli/blob/v4.10.0/LICENSE):
|
|
1014
998
|
|
|
1015
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
1016
|
-
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
1017
|
-
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
1018
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
1019
|
-
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1020
999
|
```
|
|
1000
|
+
Copyright JS Foundation and other contributors
|
|
1021
1001
|
|
|
1022
|
-
|
|
1002
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
1003
|
+
a copy of this software and associated documentation files (the
|
|
1004
|
+
'Software'), to deal in the Software without restriction, including
|
|
1005
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
1006
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
1007
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
1008
|
+
the following conditions:
|
|
1023
1009
|
|
|
1024
|
-
|
|
1010
|
+
The above copyright notice and this permission notice shall be
|
|
1011
|
+
included in all copies or substantial portions of the Software.
|
|
1025
1012
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
notice, this list of conditions and the following disclaimer in the
|
|
1034
|
-
documentation and/or other materials provided with the distribution.
|
|
1035
|
-
|
|
1036
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
1037
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1038
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
1039
|
-
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
1040
|
-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
1041
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
1042
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
1043
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
1044
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
1045
|
-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1013
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
1014
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
1015
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
1016
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
1017
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
1018
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
1019
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1046
1020
|
```
|
|
1047
1021
|
|
|
1048
1022
|
### webpack
|
|
1049
1023
|
|
|
1050
|
-
This product includes source derived from [webpack](https://github.com/webpack/webpack) ([v5.
|
|
1024
|
+
This product includes source derived from [webpack](https://github.com/webpack/webpack) ([v5.101.0](https://github.com/webpack/webpack/tree/v5.101.0)), distributed under the [MIT License](https://github.com/webpack/webpack/blob/v5.101.0/LICENSE):
|
|
1051
1025
|
|
|
1052
1026
|
```
|
|
1053
1027
|
Copyright JS Foundation and other contributors
|