imposium-js-sdk 3.5.6 → 3.5.8
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/.prettierignore +13 -0
- package/CODESTEWARDS.md +12 -0
- package/README.md +14 -15
- package/eslint-report.xml +1 -0
- package/examples/web/.eslintrc.json +10 -14
- package/lib/imposium.js +18835 -61069
- package/lib/imposium.js.map +1 -1
- package/lib/imposium.min.js +1 -1
- package/lib/imposium.min.js.LICENSE.txt +15 -2
- package/lib/imposium.min.js.map +1 -1
- package/package.json +40 -11
- package/tsconfig.eslint.json +8 -0
- package/vitest.config.ts +37 -0
- package/.eslintrc.js +0 -168
- package/CODEOWNERS +0 -1
package/.prettierignore
ADDED
package/CODESTEWARDS.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Code Stewards
|
|
2
|
+
|
|
3
|
+
Code stewards are a set of people who are very familiar with the repository and can act as stakeholders and authority for design and architecture decisions. They serve as default reviewers for pull requests.
|
|
4
|
+
|
|
5
|
+
## Current Code Stewards
|
|
6
|
+
|
|
7
|
+
1. **Greg Webber**
|
|
8
|
+
- Email: greg.webber@innovid.com
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
**Note:** For questions about workflow, design decisions, or architecture, consult the code stewards listed above.
|
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
Imposium JavaScript SDK
|
|
2
|
-
|
|
1
|
+
# Imposium JavaScript SDK
|
|
2
|
+
|
|
3
|
+
# Documentation
|
|
3
4
|
|
|
4
|
-
Documentation
|
|
5
|
-
======
|
|
6
5
|
<a href="https://docs.imposium.com/js-sdk/" target="_blank">https://docs.imposium.com/js-sdk/</a>
|
|
7
6
|
|
|
8
|
-
Basic Example
|
|
9
|
-
======
|
|
7
|
+
# Basic Example
|
|
10
8
|
|
|
11
9
|
### 1. Install:
|
|
12
10
|
|
|
@@ -15,17 +13,18 @@ Basic Example
|
|
|
15
13
|
### 2. Create an Imposium reference:
|
|
16
14
|
|
|
17
15
|
```javascript
|
|
18
|
-
|
|
19
16
|
// Choose one of the following:
|
|
20
17
|
|
|
21
18
|
// commonJS
|
|
22
19
|
var Imposium = require('imposium-js-sdk');
|
|
23
20
|
|
|
24
|
-
// ES6 modules
|
|
21
|
+
// ES6 modules
|
|
25
22
|
import * as Imposium from 'imposium-js-sdk';
|
|
26
23
|
|
|
27
24
|
// Include
|
|
28
|
-
<script
|
|
25
|
+
<script
|
|
26
|
+
type='text/javascript'
|
|
27
|
+
src='../lib/imposium.min.js'></script>;
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
### 3. Set up your Imposium configuration:
|
|
@@ -34,8 +33,8 @@ The following values are used to communicate with your project. You will receive
|
|
|
34
33
|
|
|
35
34
|
```javascript
|
|
36
35
|
var config = {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
accessToken: 'your_access_token',
|
|
37
|
+
storyId: 'your_story_id'
|
|
39
38
|
};
|
|
40
39
|
```
|
|
41
40
|
|
|
@@ -58,11 +57,11 @@ var player = new Imposium.Player(videoElement, client);
|
|
|
58
57
|
|
|
59
58
|
### 5. Define events you want to listen for:
|
|
60
59
|
|
|
61
|
-
The Imposium client has a number of events you can listen for to help you control functionality around our SDK. For this example, let's say you want to receive status updates related to processing. To do this, you must set a callback function for the `STATUS_UPDATE` event.
|
|
60
|
+
The Imposium client has a number of events you can listen for to help you control functionality around our SDK. For this example, let's say you want to receive status updates related to processing. To do this, you must set a callback function for the `STATUS_UPDATE` event.
|
|
62
61
|
|
|
63
62
|
```javascript
|
|
64
63
|
function statusUpdate(event) {
|
|
65
|
-
|
|
64
|
+
console.log(event.status);
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
client.on(Imposium.Events.STATUS_UPDATE, statusUpdate);
|
|
@@ -77,8 +76,8 @@ var fileInput = document.getElementById('my-file-input');
|
|
|
77
76
|
var imageFile = fileInput.files[0];
|
|
78
77
|
|
|
79
78
|
var inventory = {
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
text: 'hello_world',
|
|
80
|
+
image: imageFile
|
|
82
81
|
};
|
|
83
82
|
```
|
|
84
83
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><checkstyle version="4.3"><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/Entry.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/client/Client.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/client/DirectDeliveryPipe.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/client/http/API.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/scaffolding/ExceptionPipe.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/scaffolding/Exceptions.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/scaffolding/GoogleAnalytics.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/scaffolding/Helpers.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/scaffolding/Version.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/video/FallbackPlayer.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/video/Player.ts"></file><file name="/opt/buildagent/work/32523f1dc87b9a4f/src/video/VideoPlayer.ts"></file></checkstyle>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"plugins": [
|
|
3
|
-
|
|
4
|
-
],
|
|
5
|
-
"extends": [
|
|
6
|
-
"eslint:recommended"
|
|
7
|
-
],
|
|
2
|
+
"plugins": ["html"],
|
|
3
|
+
"extends": ["eslint:recommended"],
|
|
8
4
|
"parserOptions": {
|
|
9
5
|
"ecmaVersion": 5
|
|
10
6
|
},
|
|
@@ -12,15 +8,15 @@
|
|
|
12
8
|
"browser": true,
|
|
13
9
|
"node": false
|
|
14
10
|
},
|
|
15
|
-
"rules":{
|
|
16
|
-
"no-trailing-spaces":"error",
|
|
17
|
-
"no-unused-vars":["error", {"vars":"local"}],
|
|
18
|
-
"quotes":["error", "single"],
|
|
19
|
-
"no-console":"off",
|
|
20
|
-
"camelcase":"error",
|
|
21
|
-
"no-empty-function":"error"
|
|
11
|
+
"rules": {
|
|
12
|
+
"no-trailing-spaces": "error",
|
|
13
|
+
"no-unused-vars": ["error", { "vars": "local" }],
|
|
14
|
+
"quotes": ["error", "single"],
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
"camelcase": "error",
|
|
17
|
+
"no-empty-function": "error"
|
|
22
18
|
},
|
|
23
|
-
"globals":{
|
|
19
|
+
"globals": {
|
|
24
20
|
"Imposium": true
|
|
25
21
|
}
|
|
26
22
|
}
|