videojs-hls-boomstream 1.2.86 → 1.2.89
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 +28 -0
- package/README.md +32 -0
- package/dist/typings.d.ts +161 -21
- package/dist/videojs-hls-boomstream.cjs.js +2 -2
- package/dist/videojs-hls-boomstream.es.js +2 -2
- package/dist/videojs-hls-boomstream.js +2 -2
- package/dist/videojs-hls-boomstream.min.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
# Changelog of ```videojs-hls-boomstream```
|
|
2
|
+
## 1.2.89
|
|
3
|
+
FIX: Исправлено воспроизведение стрима с ограниченным доступом
|
|
4
|
+
## 1.2.88
|
|
5
|
+
FIX: Исправлено воспроизведение стрима в плейлисте, переделан механизм передачи ключа для расшифровки
|
|
6
|
+
## 1.2.87
|
|
7
|
+
FIX: Убрал вывод ошибки в консоль при ограничении доступа
|
|
8
|
+
## 1.2.86-alpha.10
|
|
9
|
+
FIX: Исправлена ошибка в плагине при вопроизведении видео после оффлайн стрима
|
|
10
|
+
## 1.2.86-alpha.9
|
|
11
|
+
FIX: Исправлена ошибка в плагине при отсутствии доступа к localStorage
|
|
12
|
+
## 1.2.86-alpha.8
|
|
13
|
+
FIX: Исправлена ошибка в плагине при выключенных cookie у клиента
|
|
14
|
+
## 1.2.86-alpha.7
|
|
15
|
+
FIX: Пофикшена работа шифрованных медиа на xiaomi
|
|
16
|
+
## 1.2.86-alpha.6
|
|
17
|
+
FIX: Пофикшена работа шифрованных медиа на macOS
|
|
18
|
+
## 1.2.86-alpha.5
|
|
19
|
+
FIX: Пофикшено отображение качества на андройде в плейлисте
|
|
20
|
+
## 1.2.86-alpha.4
|
|
21
|
+
FIX: Пофикшено приостановление стрим
|
|
22
|
+
## 1.2.86-alpha.3
|
|
23
|
+
FIX: Переписана работа автокачества для андройда
|
|
24
|
+
## 1.2.86-alpha.2
|
|
25
|
+
FIX: Исправлена проблема с автокачеством на macOS и iOS. Отрефакторено глобальное состояние плагина
|
|
26
|
+
## 1.2.86-alpha.1
|
|
27
|
+
FIX: Исправлены проблемы с авто качеством плеера, добавлено API для выбора качества
|
|
28
|
+
## 1.2.86-alpha.0
|
|
29
|
+
FIX: Версия 1.2.86 помечена как alpha
|
|
2
30
|
## 1.2.86
|
|
3
31
|
FIX: Добавлено автокачество на айфоне и андройде
|
|
4
32
|
## 1.2.85
|
package/README.md
CHANGED
|
@@ -282,6 +282,38 @@ Below will be a description of the playlist methods:
|
|
|
282
282
|
- ```getCurrentAutoplayConfig(): AutoplayConfig;``` - returns current autoplay config (type is described above).
|
|
283
283
|
- ```getCurrentPlaylist(): BMSPlaylistType;``` - returns **copy** of current playlist (type is described above).
|
|
284
284
|
- ```getCurrentMedia(): BMSPlaylistItem;``` - returns **copy** of current media (type is described above).
|
|
285
|
+
|
|
286
|
+
## Quality API
|
|
287
|
+
videojs-hls-boomstream creates **bQuality** property on **player** object if you enable quality plugin in options.
|
|
288
|
+
**bQuality** has the following interface:
|
|
289
|
+
```ts
|
|
290
|
+
interface IQualityApi {
|
|
291
|
+
getQualityList: () => UsersQuality[];
|
|
292
|
+
getQualityById: (qualityId: string) => UsersQuality | undefined;
|
|
293
|
+
getSelectedQualityId: () => string;
|
|
294
|
+
setQualityById: (qualityId: string) => void;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface UsersQuality {
|
|
298
|
+
id: string;
|
|
299
|
+
bandwidth: number;
|
|
300
|
+
width?: number;
|
|
301
|
+
height?: number;
|
|
302
|
+
name?: string;
|
|
303
|
+
};
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
This api triggers (```player.trigger```) 2 types of events:
|
|
307
|
+
- ```qualities_initialized``` - triggers when quality list has been initialized (once for one media); has ```UsersQuality[]``` as a payload
|
|
308
|
+
- ```new_quality_selected``` - triggers every time a new quality sets by ```setQualityById``` method (not triggers when adaptive bitrate algorithm selects new quality when auto quality is setted); has quality id as a payload
|
|
309
|
+
|
|
310
|
+
Below will be a description of the quality api methods:
|
|
311
|
+
- ```getQualityList: () => UsersQuality[]``` - returns a list of available qualities for current media
|
|
312
|
+
- ```getQualityById: (qualityId: string) => UsersQuality | undefined``` - if ```qualityId``` isn't string print warning in console and return ```undefined```; returns a quality object if found in quality list otherwise return ```undefined```
|
|
313
|
+
- ```getSelectedQualityId: () => string``` - if selected quality is auto returns ```'auto'``` otherwise returns quality id
|
|
314
|
+
- ```setQualityById: (qualityId: string) => void``` - if ```qualityId``` isn't string prints error in console and do nothing; if ```qualityId``` equals id which has already been selected prints warning in console and do nothing; otherwise set new quality and triggers ```new_quality_selected``` event with qualityId payload;
|
|
315
|
+
|
|
316
|
+
|
|
285
317
|
## License
|
|
286
318
|
|
|
287
319
|
MIT. Copyright (c) support@boomstream.com
|
package/dist/typings.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IQualityApi, CustomQuality } from './quality/QualityApiTypes';
|
|
2
|
+
import { BMSPlaylistLoaderInterface } from './plugin/bms-playlist/playlist-loader/BMSPlaylistLoaderInterface';
|
|
1
3
|
import boomstreamHls, {
|
|
2
4
|
BMSPluginError,
|
|
3
5
|
BMSPluginErrorType,
|
|
@@ -11,9 +13,14 @@ import { LiveVodRequestSenderInterface } from 'src/live-vod-request-sender/LiveV
|
|
|
11
13
|
declare module 'video.js' {
|
|
12
14
|
export interface VideoJsPlayer {
|
|
13
15
|
boomstreamHls(options: Partial<BoomstreamHlsOptions>): void;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
mediaData: Source;
|
|
17
|
+
session: number;
|
|
18
|
+
bases: BoomstreamBases;
|
|
19
|
+
id_: string;
|
|
20
|
+
id_recovery: null | string;
|
|
21
|
+
bPlaylist?: BMSPlaylistLoaderInterface;
|
|
22
|
+
tech(): BoomstreamPlayerTech;
|
|
23
|
+
bQuality?: IQualityApi;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
|
|
@@ -64,12 +71,12 @@ export enum VideoMimeTypesEnum {
|
|
|
64
71
|
LIVE = 'live'
|
|
65
72
|
}
|
|
66
73
|
|
|
67
|
-
export type VideoMimeTypesList =
|
|
68
|
-
'application/x-mpegURL'
|
|
69
|
-
| 'application/vnd.apple.mpegurl'
|
|
70
|
-
| 'video/3gpp'
|
|
71
|
-
| 'video/3gpp2'
|
|
72
|
-
| 'video/3gp2'
|
|
74
|
+
export type VideoMimeTypesList =
|
|
75
|
+
'application/x-mpegURL'
|
|
76
|
+
| 'application/vnd.apple.mpegurl'
|
|
77
|
+
| 'video/3gpp'
|
|
78
|
+
| 'video/3gpp2'
|
|
79
|
+
| 'video/3gp2'
|
|
73
80
|
| 'video/mpeg'
|
|
74
81
|
| 'video/mp4'
|
|
75
82
|
| 'video/ogg'
|
|
@@ -102,8 +109,14 @@ export type Source = {
|
|
|
102
109
|
};
|
|
103
110
|
|
|
104
111
|
export type BoomstreamPlayerTech = videojs.Tech & {
|
|
112
|
+
vhs: any;
|
|
113
|
+
hls: any;
|
|
105
114
|
currentSource_: Source;
|
|
106
115
|
session: null | number;
|
|
116
|
+
qualities?: CustomQuality[];
|
|
117
|
+
play?: () => void;
|
|
118
|
+
load?: () => void;
|
|
119
|
+
setSource?: (source: unknown, onlyQuality: boolean) => void;
|
|
107
120
|
}
|
|
108
121
|
|
|
109
122
|
// Source[] with at least 1 Source object. There must be at least 1 source for item
|
|
@@ -147,18 +160,6 @@ export type BoomstreamBases = {
|
|
|
147
160
|
io: string;
|
|
148
161
|
};
|
|
149
162
|
|
|
150
|
-
export type GlobalState = {
|
|
151
|
-
players: VideoJsPlayer[];
|
|
152
|
-
offlineStreamHandler: BMSOfflineStreamHandlerInterface;
|
|
153
|
-
currentMediaCode: string;
|
|
154
|
-
isBmsUIUsed: boolean;
|
|
155
|
-
offlineStreamErrorHandler: () => void;
|
|
156
|
-
liveVodRequestSender: LiveVodRequestSenderInterface[];
|
|
157
|
-
googleAnalyticPartnerKey: string;
|
|
158
|
-
yandexAnalyticPartnerKey: string;
|
|
159
|
-
typeApp: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
163
|
export type VideoElementDimensions = {
|
|
163
164
|
width: string;
|
|
164
165
|
height: string;
|
|
@@ -176,3 +177,142 @@ export type Bases = {
|
|
|
176
177
|
frontend: string;
|
|
177
178
|
io: string;
|
|
178
179
|
}
|
|
180
|
+
|
|
181
|
+
export enum SkinType {
|
|
182
|
+
Light = '',
|
|
183
|
+
Dark = 'dark',
|
|
184
|
+
Device = 'device'
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export enum Position {
|
|
188
|
+
Right = 'right',
|
|
189
|
+
Left = 'left'
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export enum AreaTypes {
|
|
193
|
+
None = '',
|
|
194
|
+
Chat = 'bms-chat',
|
|
195
|
+
Playlist = 'bms-playlist',
|
|
196
|
+
Settings = 'bms-settings',
|
|
197
|
+
Information = 'bms-information',
|
|
198
|
+
FrameArea = 'sidebar-frame'
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export enum SubscriptionTypes {
|
|
202
|
+
Subscription = 'subscription',
|
|
203
|
+
Payment = 'payment',
|
|
204
|
+
Password = 'password',
|
|
205
|
+
Collection = 'collection'
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export enum TranslationLiveStatus {
|
|
209
|
+
UNCHEKED,
|
|
210
|
+
ONLINE,
|
|
211
|
+
OFFLINE
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface SubscriptionOptions {
|
|
215
|
+
about: string;
|
|
216
|
+
access_expire?: Date;
|
|
217
|
+
code: string;
|
|
218
|
+
cost: string;
|
|
219
|
+
format: string;
|
|
220
|
+
period: string;
|
|
221
|
+
preview_time: string;
|
|
222
|
+
subscription_type: SubscriptionTypes;
|
|
223
|
+
title: string;
|
|
224
|
+
usePromocode: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface GatewayOption {
|
|
228
|
+
id: string;
|
|
229
|
+
name: string;
|
|
230
|
+
title: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface BmsSourcePoster {
|
|
234
|
+
height: number;
|
|
235
|
+
link: string;
|
|
236
|
+
width: number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type Media = {
|
|
240
|
+
code: string;
|
|
241
|
+
links: {
|
|
242
|
+
hls: string;
|
|
243
|
+
raw: string;
|
|
244
|
+
vtt: string;
|
|
245
|
+
};
|
|
246
|
+
posters: Array<Poster>;
|
|
247
|
+
source: boolean;
|
|
248
|
+
sources: Array<unknown>;
|
|
249
|
+
title: string;
|
|
250
|
+
token: string;
|
|
251
|
+
tokenToDecrypt?: string;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export type Video = Media & { duration: string };
|
|
255
|
+
|
|
256
|
+
export type Record = Video & { type: string };
|
|
257
|
+
|
|
258
|
+
export type Stream = Media & {
|
|
259
|
+
chatIsEnabled: boolean;
|
|
260
|
+
checkLiveUrl: string;
|
|
261
|
+
entityCode: string;
|
|
262
|
+
isPublish: boolean;
|
|
263
|
+
link: null | string;
|
|
264
|
+
message: string;
|
|
265
|
+
records: Array<Record>;
|
|
266
|
+
type: string;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export type MediaData = Stream | Video | Array<Stream | Video>;
|
|
270
|
+
|
|
271
|
+
export interface BmsPlayerConfig {
|
|
272
|
+
[key: string]: any;
|
|
273
|
+
bases: {
|
|
274
|
+
api: string;
|
|
275
|
+
frontend: string;
|
|
276
|
+
io: string;
|
|
277
|
+
parked?: string;
|
|
278
|
+
};
|
|
279
|
+
code: string;
|
|
280
|
+
language: string;
|
|
281
|
+
id_recovery: null | string;
|
|
282
|
+
subscriptions?: SubscriptionOptions[];
|
|
283
|
+
gateways?: GatewayOption[];
|
|
284
|
+
entity: {
|
|
285
|
+
code: string;
|
|
286
|
+
title: string;
|
|
287
|
+
};
|
|
288
|
+
device_ban: '0' | '1';
|
|
289
|
+
time?: Date;
|
|
290
|
+
recoveryCode?: string;
|
|
291
|
+
contacts?: {
|
|
292
|
+
contact: string;
|
|
293
|
+
phone: string;
|
|
294
|
+
email: string;
|
|
295
|
+
site: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
posters: BmsSourcePoster[];
|
|
299
|
+
ppv_logo?: string;
|
|
300
|
+
ppv_play_button_state_play?: string;
|
|
301
|
+
mediaData: MediaData;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface BmsVideoSource {
|
|
305
|
+
bms: boolean;
|
|
306
|
+
code: string;
|
|
307
|
+
duration: string;
|
|
308
|
+
encoded: boolean;
|
|
309
|
+
isLive: boolean;
|
|
310
|
+
name: string;
|
|
311
|
+
poster: string;
|
|
312
|
+
posters: BmsSourcePoster[];
|
|
313
|
+
src: string;
|
|
314
|
+
state: string;
|
|
315
|
+
type: string;
|
|
316
|
+
token?: string;
|
|
317
|
+
}
|
|
318
|
+
|