@eyevinn/player-analytics-client-sdk-web 0.0.9 → 0.0.10

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.
Files changed (2) hide show
  1. package/Readme.md +11 -4
  2. package/package.json +4 -4
package/Readme.md CHANGED
@@ -14,11 +14,11 @@ npm install @eyevinn/player-analytics-client-sdk-web
14
14
  import { PlayerAnalyticsConnector } from "@eyevinn/player-analytics-client-sdk-web";
15
15
 
16
16
  // Create your instance and set the analytics eventsink endpoint
17
- const playerAnalytics = new PlayerAnalyticsConnector("https://eventsink-url.io");
17
+ const playerAnalytics = new PlayerAnalyticsConnector("https://your-eventsink-url.io");
18
18
 
19
19
  // Initiate the analytics with the base data needed
20
20
  // This will create you session in the backend
21
- playerAnalytics.init({
21
+ await playerAnalytics.init({
22
22
  sessionId: "generated-unique-uuid-session-id",
23
23
  live: false,
24
24
  contentId: "big-buck-bunny-720",
@@ -68,8 +68,8 @@ playerAnalytics.reportWarning({
68
68
  import { PlayerAnalytics } from "@eyevinn/player-analytics-client-sdk-web";
69
69
 
70
70
  // Create your instance and set the analytics eventsink endpoint
71
- const playerAnalytics = new PlayerAnalytics("https://eventsink-url.io");
72
- playerAnalytics.init({
71
+ const playerAnalytics = new PlayerAnalytics("https://your-eventsink-url.io");
72
+ await playerAnalytics.initiateAnalyticsReporter({
73
73
  sessionId: "generated-unique-uuid-session-id",
74
74
  live: false,
75
75
  contentId: "big-buck-bunny-720",
@@ -90,6 +90,13 @@ videoElement.addEventListener("play", () => {
90
90
  });
91
91
  ```
92
92
 
93
+ ### Constructor parameters
94
+
95
+ These applies to both the `PlayerAnalyticsConnector` and `PlayerAnalytics`.
96
+
97
+ - `eventsinkUrl`, the url to your event sink.
98
+ - `debug`, default false, triggers output to dev console rather than actual http posts.
99
+
93
100
  ### Init parameters
94
101
 
95
102
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyevinn/player-analytics-client-sdk-web",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "source": "index.ts",
6
6
  "main": "dist/index.js",
@@ -28,12 +28,12 @@
28
28
  "@parcel/packager-ts": "^2.0.1",
29
29
  "@parcel/transformer-typescript-tsc": "^2.0.1",
30
30
  "@parcel/transformer-typescript-types": "^2.0.1",
31
- "@typescript-eslint/eslint-plugin": "^5.7.0",
32
- "@typescript-eslint/parser": "^5.7.0",
31
+ "@typescript-eslint/eslint-plugin": "^5.10.2",
32
+ "@typescript-eslint/parser": "^5.10.2",
33
33
  "eslint": "^8.5.0",
34
34
  "eslint-config-prettier": "^8.3.0",
35
35
  "eslint-plugin-prettier": "^4.0.0",
36
- "parcel": "^2.0.1",
36
+ "parcel": "^2.2.1",
37
37
  "prettier": "^2.5.1",
38
38
  "typescript": "^4.5.4"
39
39
  },