@brandbrigade/ott-bb-player 1.0.43 → 1.0.45
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/LICENCE +29 -0
- package/README.md +266 -218
- package/dist/OTTPlayer.js +272 -0
- package/package.json +22 -7
- package/src/Ads.js +82 -0
- package/src/Augmentor.js +1288 -0
- package/src/Composer3DBase.js +754 -0
- package/src/Composer3DForMainThread.js +131 -0
- package/src/Composer3DForWorker.js +80 -0
- package/src/Composer3DWorker.js +60 -0
- package/src/MetaDataDecoder.js +143 -0
- package/src/MetaDataFetcher.js +88 -0
- package/src/OTTPlayer.js +254 -0
- package/src/Socket.js +44 -0
- package/src/composer_worker.js +30 -0
- package/src/configs/OTT_Dev_Config_Debug.json +8 -0
- package/src/configs/OTT_Dev_Config_Debug_14fps.json +8 -0
- package/src/configs/OTT_Dev_Config_Debug_29fps.json +8 -0
- package/src/configs/OTT_Dev_Config_Debug_General.json +7 -0
- package/src/enums/RenderingMode.js +5 -0
- package/src/enums/SyncMethod.js +5 -0
- package/src/index.js +241 -0
- package/src/meta_worker.js +144 -0
- package/src/shaders/v1.js +87 -0
- package/src/shaders/v1Old.js +174 -0
- package/src/shaders/v2.js +193 -0
- package/src/test-pages/mp4/index.html +63 -0
- package/src/test-pages/mp4/index.js +23 -0
- package/src/test-pages/mp4/style.css +16 -0
- package/src/utils/FPSFetter.js +94 -0
- package/src/utils/MedianCalculator.js +27 -0
- package/src/utils/index.js +5 -0
- package/src/utils/isPowerOf2.js +3 -0
- package/src/utils/platform.js +191 -0
- package/src/utils/timeCodeUtils.js +274 -0
- package/js/OTTPlayer.js +0 -1
- package/mediakind.html +0 -273
package/LICENCE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright 2021, GFXFundamentals.
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright
|
|
10
|
+
notice, this list of conditions and the following disclaimer.
|
|
11
|
+
* Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
in the documentation and/or other materials provided with the
|
|
14
|
+
distribution.
|
|
15
|
+
* Neither the name of GFXFundamentals. nor the names of his
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,218 +1,266 @@
|
|
|
1
|
-
# OTT-BB-Player
|
|
2
|
-
|
|
3
|
-
Welcome to OTT-BB-Player! This README provides information about the project, including installation instructions and a changelog.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Overview](#Overview)
|
|
8
|
-
- [Installation](#installation)
|
|
9
|
-
- [HowTo](#HowTo)
|
|
10
|
-
- [Example](#example)
|
|
11
|
-
- [Changelog](#changelog)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Example
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bbPlayer.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Added
|
|
115
|
-
|
|
116
|
-
### Version 1.0.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### Version 1.0.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Safari
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Version 1.0.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
### Version
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
### Version
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
### Version v1.0.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### Version v1.0.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### Version v1.0.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
### Version v1.0.
|
|
217
|
-
|
|
218
|
-
|
|
1
|
+
# OTT-BB-Player
|
|
2
|
+
|
|
3
|
+
Welcome to OTT-BB-Player! This README provides information about the project, including installation instructions and a changelog.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#Overview)
|
|
8
|
+
- [Installation](#installation)
|
|
9
|
+
- [HowTo](#HowTo)
|
|
10
|
+
- [Example](#example)
|
|
11
|
+
- [Changelog](#changelog)
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
The SDK allows to augment targeted ads on top of DRM1 stream, providing that the same content is/was augmetned by BrandBrigade and the augmentation metadata is stored in the BrandBrigade cloud Smart-Feed, and providing that the stream contains embeded timecodes that match in a frame-accurate manner the timecode embedded in the smart feed.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
To install My Project, follow these steps:
|
|
20
|
+
|
|
21
|
+
1. Login into npmjs repo if you are not logged in
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm login
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. Use npm to install the package
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @brandbrigade/ott-bb-player --prefix .
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## HowTo
|
|
34
|
+
|
|
35
|
+
### Initialization
|
|
36
|
+
|
|
37
|
+
To initialize the SDK, one should provide:
|
|
38
|
+
|
|
39
|
+
1. Video Tag: You should submit the video element (the one that is submitted to the MK player by wmcMgr.setContainer(video))
|
|
40
|
+
|
|
41
|
+
2. Frame rate
|
|
42
|
+
(In the future this parameter will be omitted and fetched internally with the MediaKind API)
|
|
43
|
+
|
|
44
|
+
3. A game id: This is an identifier for the game which is shared between the NBA app and the BB DTC client to define the appropriate smart feed to be accessed
|
|
45
|
+
|
|
46
|
+
4. A channel name: The programmatic emulation channel to demonstrate the targeted ad
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
bbPlayer = new BB.OTTPlayer(
|
|
50
|
+
video, //Video Tag
|
|
51
|
+
30000/1001, // frame rate
|
|
52
|
+
{ gameId:<game id>,//game id
|
|
53
|
+
augmentation:{“channelName”:”nba”}});//channel name
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Example
|
|
57
|
+
|
|
58
|
+
**sample.html** is an example page showing usage of OTT-BB-Player
|
|
59
|
+
A test page hosted on the BB server can be accessed [here](http://bb-ott-player.s3-website-us-east-1.amazonaws.com/demo/node_modules/@brandbrigade/ott-bb-player/sample.html)
|
|
60
|
+
|
|
61
|
+
The inital configuration on the config json on the top of the sample.html page, requires:
|
|
62
|
+
|
|
63
|
+
1. A Stream URL. An example stream can be accessed at [this link](https://nbablpng.akamaized.net/live/hls-itc/bbtest49/v0-121.m3u8?stSecret=rj12sw543terw32422334swees) (MK Stream with MetadataEvents) or [here](https://injecto-streams.s3-accelerate.amazonaws.com/hls_fileTest_tmp/index_test.m3u8) (BB Stream without MetadataEvents)
|
|
64
|
+
2. The game id. For a test case use “arena_nba_BB_test_Lakers_long”. The game id is a convention to be agreed between the NBA App and the BrandBrigade SDK to identify the playing game.
|
|
65
|
+
3. A Channel for the programmatic ads simulation. For a test case use “nba”
|
|
66
|
+
Example:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
var config = {
|
|
70
|
+
"url":"https://injecto-streams.s3-accelerate.amazonaws.com/hls_fileTest_tmp/index_test.m3u8",
|
|
71
|
+
"gameId":"“arena_nba_BB_test_Lakers_long”,
|
|
72
|
+
"channel":"nba"
|
|
73
|
+
};
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
To get Timecode information AMC_EVENT_PLAYER_METADATA and AMC_EVENT_PLAYER_SEGMENT_PLAYBACK events should be forwarded to OTTPlayer
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
function onNewMetadata(eventObj) {
|
|
80
|
+
bbPlayer.onNewMetadata(eventObj)
|
|
81
|
+
};
|
|
82
|
+
function onNewSegment(eventObj) {
|
|
83
|
+
bbPlayer.onNewSegment(eventObj);
|
|
84
|
+
};
|
|
85
|
+
wmcMgr.addEventListener(wmcEvents.AMC_EVENT_PLAYER_METADATA, onNewMetadata);
|
|
86
|
+
wmcMgr.addEventListener(wmcEvents.AMC_EVENT_PLAYER_SEGMENT_PLAYBACK, onNewSegment);
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Control
|
|
91
|
+
|
|
92
|
+
To toggle the SDK on off, use the SDK Toggle method with a boolean:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
bbPlayer.Toggle({true|false});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Changelog
|
|
99
|
+
|
|
100
|
+
### Version 1.0.0
|
|
101
|
+
|
|
102
|
+
Initial version
|
|
103
|
+
|
|
104
|
+
### Version 1.0.1
|
|
105
|
+
|
|
106
|
+
Initial version
|
|
107
|
+
|
|
108
|
+
### Version 1.0.2
|
|
109
|
+
|
|
110
|
+
Initial version
|
|
111
|
+
|
|
112
|
+
### Version 1.0.3
|
|
113
|
+
|
|
114
|
+
Added readme.md
|
|
115
|
+
|
|
116
|
+
### Version 1.0.4
|
|
117
|
+
|
|
118
|
+
Added support of 59.94 streams
|
|
119
|
+
|
|
120
|
+
Added interface functions to get sync timecodes from MK MetadataEvents
|
|
121
|
+
|
|
122
|
+
### Version 1.0.5
|
|
123
|
+
|
|
124
|
+
Added support of Safari on Mac
|
|
125
|
+
|
|
126
|
+
### Version 1.0.6
|
|
127
|
+
|
|
128
|
+
Enabled support of Safari on Mac
|
|
129
|
+
|
|
130
|
+
### Version 1.0.7
|
|
131
|
+
|
|
132
|
+
Fixed Safari issue.
|
|
133
|
+
Improved Chrome rendering
|
|
134
|
+
|
|
135
|
+
### Version 1.0.8
|
|
136
|
+
|
|
137
|
+
Added usage of TimeCodesSync service
|
|
138
|
+
|
|
139
|
+
### Version 1.0.9
|
|
140
|
+
|
|
141
|
+
Bug fix
|
|
142
|
+
|
|
143
|
+
### Version 1.0.10
|
|
144
|
+
|
|
145
|
+
Bug fix
|
|
146
|
+
|
|
147
|
+
### Version 1.0.11
|
|
148
|
+
|
|
149
|
+
Bug fix
|
|
150
|
+
|
|
151
|
+
### Version 1.0.12
|
|
152
|
+
|
|
153
|
+
All is packed to one file
|
|
154
|
+
|
|
155
|
+
### Version 1.0.13
|
|
156
|
+
|
|
157
|
+
Chrome on MK REF App support
|
|
158
|
+
|
|
159
|
+
### Version 1.0.14
|
|
160
|
+
|
|
161
|
+
Safari on MK REF App support
|
|
162
|
+
|
|
163
|
+
### Version 1.0.15
|
|
164
|
+
|
|
165
|
+
MK REF App DEV stream support
|
|
166
|
+
|
|
167
|
+
### Version 1.0.16
|
|
168
|
+
|
|
169
|
+
Improvements
|
|
170
|
+
|
|
171
|
+
### Version 1.0.17
|
|
172
|
+
|
|
173
|
+
Improvements
|
|
174
|
+
|
|
175
|
+
### Version 1.0.18
|
|
176
|
+
|
|
177
|
+
Improvements
|
|
178
|
+
|
|
179
|
+
### Version v1.0.19
|
|
180
|
+
|
|
181
|
+
Chrome-Mac support
|
|
182
|
+
|
|
183
|
+
### Version v1.0.20
|
|
184
|
+
|
|
185
|
+
Improvements### Version v1.0.21
|
|
186
|
+
test26
|
|
187
|
+
|
|
188
|
+
### Version v1.0.22
|
|
189
|
+
|
|
190
|
+
test26
|
|
191
|
+
|
|
192
|
+
### Version v1.0.23
|
|
193
|
+
|
|
194
|
+
test_v_1.0.23
|
|
195
|
+
|
|
196
|
+
### Version v1.0.24
|
|
197
|
+
|
|
198
|
+
test
|
|
199
|
+
|
|
200
|
+
### Version v1.0.25
|
|
201
|
+
|
|
202
|
+
test
|
|
203
|
+
|
|
204
|
+
### Version v1.0.26
|
|
205
|
+
|
|
206
|
+
test
|
|
207
|
+
|
|
208
|
+
### Version v1.0.27
|
|
209
|
+
|
|
210
|
+
test
|
|
211
|
+
|
|
212
|
+
### Version v1.0.28
|
|
213
|
+
|
|
214
|
+
test
|
|
215
|
+
|
|
216
|
+
### Version v1.0.29
|
|
217
|
+
|
|
218
|
+
test
|
|
219
|
+
|
|
220
|
+
### Version v1.0.30
|
|
221
|
+
|
|
222
|
+
test
|
|
223
|
+
|
|
224
|
+
### Version v1.0.31
|
|
225
|
+
|
|
226
|
+
test
|
|
227
|
+
|
|
228
|
+
### Version v1.0.32
|
|
229
|
+
|
|
230
|
+
QA_newAPi_funcNames
|
|
231
|
+
|
|
232
|
+
### Version v1.0.33
|
|
233
|
+
|
|
234
|
+
mac_any_screenFPS
|
|
235
|
+
|
|
236
|
+
### Version v1.0.34
|
|
237
|
+
|
|
238
|
+
29_fps_support_in_chrome_windows
|
|
239
|
+
|
|
240
|
+
### Version v1.0.35
|
|
241
|
+
|
|
242
|
+
added_more_debug_to_virtualott
|
|
243
|
+
|
|
244
|
+
### Version v1.0.36
|
|
245
|
+
|
|
246
|
+
mac_chrome_correction_disable
|
|
247
|
+
|
|
248
|
+
### Version v1.0.37
|
|
249
|
+
|
|
250
|
+
one_of_jitters_fixed_on_safari_mac
|
|
251
|
+
|
|
252
|
+
### Version v1.0.38
|
|
253
|
+
|
|
254
|
+
one_of_jitters_fixed_on_safari_mac_2
|
|
255
|
+
|
|
256
|
+
### Version v1.0.39
|
|
257
|
+
|
|
258
|
+
dual_mac_chrome_safari
|
|
259
|
+
|
|
260
|
+
### Version v1.0.40
|
|
261
|
+
|
|
262
|
+
added_fps_checks
|
|
263
|
+
|
|
264
|
+
### Version v1.0.41
|
|
265
|
+
|
|
266
|
+
chrome_mac_mkRefApp_jitter_fix
|