@jwplayer/jwplayer-react-native 1.1.3 → 1.3.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/README.md +114 -21
- package/RNJWPlayer.podspec +1 -1
- package/android/build.gradle +14 -1
- package/android/src/main/java/com/jwplayer/rnjwplayer/RNJWPlayerModule.java +27 -0
- package/android/src/main/java/com/jwplayer/rnjwplayer/RNJWPlayerView.java +373 -204
- package/android/src/main/java/com/jwplayer/rnjwplayer/RNJWPlayerViewManager.java +16 -0
- package/android/src/main/java/com/jwplayer/rnjwplayer/Util.java +13 -1
- package/badges/version.svg +1 -1
- package/docs/CONFIG-REFERENCE.md +747 -0
- package/docs/MIGRATION-GUIDE.md +617 -0
- package/docs/PLATFORM-DIFFERENCES.md +693 -0
- package/docs/props.md +15 -3
- package/index.d.ts +225 -216
- package/index.js +34 -0
- package/ios/RNJWPlayer/RNJWPlayerView.swift +365 -10
- package/ios/RNJWPlayer/RNJWPlayerViewController.swift +45 -16
- package/ios/RNJWPlayer/RNJWPlayerViewManager.m +2 -0
- package/ios/RNJWPlayer/RNJWPlayerViewManager.swift +13 -0
- package/package.json +2 -2
- package/types/advertising.d.ts +514 -0
- package/types/index.d.ts +21 -0
- package/types/legacy.d.ts +82 -0
- package/types/platform-specific.d.ts +641 -0
- package/types/playlist.d.ts +410 -0
- package/types/unified-config.d.ts +591 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/docs/types.md +0 -254
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified JWPlayer React Native Configuration Types
|
|
3
|
+
*
|
|
4
|
+
* This file provides a unified configuration interface that works across
|
|
5
|
+
* both iOS (JWJSONParser) and Android (JsonHelper) platforms.
|
|
6
|
+
*
|
|
7
|
+
* Platform-specific features are clearly marked with @platform tags.
|
|
8
|
+
*
|
|
9
|
+
* @see iOS Parser: ios-json-parser/jwplayer-config.d.ts
|
|
10
|
+
* @see Android Parser: android-json-parser/jwplayer-config-types.d.ts
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { JWAdvertisingConfig } from './advertising';
|
|
14
|
+
import { JWPlaylistItem, JWSource, JWTrack, Playlist } from './playlist';
|
|
15
|
+
import {
|
|
16
|
+
AudioSessionCategory,
|
|
17
|
+
AudioSessionCategoryOptions,
|
|
18
|
+
AudioSessionMode,
|
|
19
|
+
JWStyling,
|
|
20
|
+
JWUiConfig,
|
|
21
|
+
JWLogoView,
|
|
22
|
+
JWRelatedConfig,
|
|
23
|
+
Stretching,
|
|
24
|
+
ThumbnailPreview,
|
|
25
|
+
Preload,
|
|
26
|
+
InterfaceBehavior,
|
|
27
|
+
UIGroup,
|
|
28
|
+
NextUpStyle,
|
|
29
|
+
JWExternalPlaybackSettings,
|
|
30
|
+
} from './platform-specific';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Unified JWPlayer Configuration
|
|
34
|
+
*
|
|
35
|
+
* Main configuration interface supporting both iOS and Android platforms.
|
|
36
|
+
* Uses native JSON parsers: JWJSONParser (iOS) and JsonHelper (Android)
|
|
37
|
+
*
|
|
38
|
+
* @platforms iOS, Android
|
|
39
|
+
*
|
|
40
|
+
* @example Basic Video
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const config: JWPlayerConfig = {
|
|
43
|
+
* license: 'YOUR_LICENSE_KEY',
|
|
44
|
+
* file: 'https://example.com/video.m3u8',
|
|
45
|
+
* autostart: true
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example With IMA DAI (Cross-Platform)
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const config: JWPlayerConfig = {
|
|
52
|
+
* license: 'YOUR_LICENSE_KEY',
|
|
53
|
+
* file: 'https://example.com/video.m3u8',
|
|
54
|
+
* advertising: {
|
|
55
|
+
* client: 'dai',
|
|
56
|
+
* imaDaiSettings: {
|
|
57
|
+
* videoId: 'tears-of-steel',
|
|
58
|
+
* cmsId: '2528370'
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* };
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export interface JWPlayerConfig {
|
|
65
|
+
// ========== REQUIRED ==========
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Platform-specific license key
|
|
69
|
+
*
|
|
70
|
+
* This is required for the wrapper but not parsed by native JSON parsers.
|
|
71
|
+
* You must provide the correct license for each platform.
|
|
72
|
+
*
|
|
73
|
+
* @see https://docs.jwplayer.com/players/docs/android-overview#requirements
|
|
74
|
+
* @see https://docs.jwplayer.com/players/docs/ios-overview#requirements
|
|
75
|
+
*/
|
|
76
|
+
license: string;
|
|
77
|
+
|
|
78
|
+
// ========== MEDIA CONTENT (Both platforms) ==========
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* URL of a single media file
|
|
82
|
+
*
|
|
83
|
+
* Use this for a single video configuration.
|
|
84
|
+
* Mutually exclusive with `sources` and `playlist`.
|
|
85
|
+
*
|
|
86
|
+
* @platforms iOS, Android
|
|
87
|
+
*/
|
|
88
|
+
file?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Array of video sources for multiple quality levels
|
|
92
|
+
*
|
|
93
|
+
* Use this for a single video with multiple renditions.
|
|
94
|
+
* Mutually exclusive with `file` and `playlist`.
|
|
95
|
+
*
|
|
96
|
+
* @platforms iOS, Android
|
|
97
|
+
*/
|
|
98
|
+
sources?: JWSource[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Array of playlist items or URL string pointing to a playlist feed
|
|
102
|
+
*
|
|
103
|
+
* Use this for multiple videos or a remote playlist.
|
|
104
|
+
* Mutually exclusive with `file` and `sources`.
|
|
105
|
+
*
|
|
106
|
+
* @platforms iOS, Android
|
|
107
|
+
*/
|
|
108
|
+
playlist?: Playlist;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Index of playlist item to start with (0-based)
|
|
112
|
+
*
|
|
113
|
+
* @default 0
|
|
114
|
+
* @platforms iOS, Android
|
|
115
|
+
*/
|
|
116
|
+
playlistIndex?: number;
|
|
117
|
+
|
|
118
|
+
// ========== PLAYBACK SETTINGS (Both platforms) ==========
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Whether the video should start playing automatically
|
|
122
|
+
*
|
|
123
|
+
* @default false
|
|
124
|
+
* @platforms iOS, Android
|
|
125
|
+
*/
|
|
126
|
+
autostart?: boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Whether to mute audio initially
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
* @platforms iOS, Android
|
|
133
|
+
*/
|
|
134
|
+
mute?: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Whether content should repeat after it's done playing
|
|
138
|
+
*
|
|
139
|
+
* @default false
|
|
140
|
+
* @platforms iOS, Android
|
|
141
|
+
*/
|
|
142
|
+
repeat?: boolean;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Preload behavior for content
|
|
146
|
+
* - "auto": Loads the manifest before playback (default)
|
|
147
|
+
* - "none": Doesn't preload content
|
|
148
|
+
*
|
|
149
|
+
* @default "auto"
|
|
150
|
+
* @platforms iOS, Android
|
|
151
|
+
*/
|
|
152
|
+
preload?: Preload | boolean;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Video stretching mode
|
|
156
|
+
*
|
|
157
|
+
* @platforms iOS, Android
|
|
158
|
+
*/
|
|
159
|
+
stretching?: Stretching;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Array of playback speed rates available in the player
|
|
163
|
+
* Must be between 0.25 and 4.0
|
|
164
|
+
*
|
|
165
|
+
* @example [0.5, 0.75, 1, 1.25, 1.5, 2]
|
|
166
|
+
* @platforms iOS, Android
|
|
167
|
+
*/
|
|
168
|
+
playbackRates?: number[];
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Whether to show playback rate controls
|
|
172
|
+
*
|
|
173
|
+
* @default false
|
|
174
|
+
* @platforms iOS, Android
|
|
175
|
+
*/
|
|
176
|
+
playbackRateControls?: boolean;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Maximum bitrate (in bits per second) for automatic quality switching
|
|
180
|
+
*
|
|
181
|
+
* Useful for limiting bandwidth consumption.
|
|
182
|
+
*
|
|
183
|
+
* @platforms iOS, Android
|
|
184
|
+
*/
|
|
185
|
+
bitrateUpperBound?: number;
|
|
186
|
+
|
|
187
|
+
// ========== ADVERTISING (Both platforms) ==========
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Advertising configuration
|
|
191
|
+
*
|
|
192
|
+
* Supports multiple ad clients: VAST, VMAP, Google IMA, Google DAI
|
|
193
|
+
*
|
|
194
|
+
* @platforms iOS, Android
|
|
195
|
+
*/
|
|
196
|
+
advertising?: JWAdvertisingConfig;
|
|
197
|
+
|
|
198
|
+
// ========== RELATED CONTENT (Both platforms) ==========
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Related content configuration
|
|
202
|
+
*
|
|
203
|
+
* Controls the display and behavior of recommended content.
|
|
204
|
+
*
|
|
205
|
+
* @platforms iOS, Android
|
|
206
|
+
*/
|
|
207
|
+
related?: JWRelatedConfig;
|
|
208
|
+
|
|
209
|
+
// ========== PLAYER IDENTIFICATION (Both platforms) ==========
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Player ID for JWPlayer Dashboard analytics
|
|
213
|
+
*
|
|
214
|
+
* Must be an 8-character alphanumeric string.
|
|
215
|
+
* Also accepted as "playerId".
|
|
216
|
+
*
|
|
217
|
+
* @platforms iOS, Android
|
|
218
|
+
*/
|
|
219
|
+
pid?: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Alternative naming for pid
|
|
223
|
+
*
|
|
224
|
+
* @platforms iOS, Android
|
|
225
|
+
*/
|
|
226
|
+
playerId?: string;
|
|
227
|
+
|
|
228
|
+
// ========== DISPLAY SETTINGS ==========
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Whether to display the title in the player UI
|
|
232
|
+
*
|
|
233
|
+
* @platform android
|
|
234
|
+
*/
|
|
235
|
+
displaytitle?: boolean;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Alternative camelCase naming for displaytitle
|
|
239
|
+
*
|
|
240
|
+
* @platform android
|
|
241
|
+
*/
|
|
242
|
+
displayTitle?: boolean;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Whether to display the description in the player UI
|
|
246
|
+
*
|
|
247
|
+
* @platforms iOS, Android
|
|
248
|
+
*/
|
|
249
|
+
displaydescription?: boolean;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Alternative camelCase naming for displaydescription
|
|
253
|
+
*
|
|
254
|
+
* @platforms iOS, Android
|
|
255
|
+
*/
|
|
256
|
+
displayDescription?: boolean;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Next up offset - when to show the next up overlay
|
|
260
|
+
* Can be a number (seconds) or string with % (percentage)
|
|
261
|
+
*
|
|
262
|
+
* @platforms iOS, Android
|
|
263
|
+
*/
|
|
264
|
+
nextupoffset?: string | number;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Next up style configuration
|
|
268
|
+
*
|
|
269
|
+
* @platform ios
|
|
270
|
+
*/
|
|
271
|
+
nextUpStyle?: NextUpStyle;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Thumbnail preview quality level
|
|
275
|
+
*
|
|
276
|
+
* @platform android
|
|
277
|
+
*/
|
|
278
|
+
thumbnailPreview?: ThumbnailPreview;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Logo view configuration
|
|
282
|
+
*
|
|
283
|
+
* @platforms iOS, Android
|
|
284
|
+
*/
|
|
285
|
+
logoView?: JWLogoView;
|
|
286
|
+
|
|
287
|
+
// ========== STYLING (iOS only) ==========
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Styling configuration for iOS
|
|
291
|
+
*
|
|
292
|
+
* Controls colors, fonts, captions styling, etc.
|
|
293
|
+
*
|
|
294
|
+
* Note: Android requires overloading of JWP IDs using XML styling.
|
|
295
|
+
* @see https://docs.jwplayer.com/players/docs/android-styling-guide
|
|
296
|
+
*
|
|
297
|
+
* @platform ios
|
|
298
|
+
*/
|
|
299
|
+
styling?: JWStyling;
|
|
300
|
+
|
|
301
|
+
// ========== UI CONFIGURATION (Android only) ==========
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* UI configuration for Android
|
|
305
|
+
*
|
|
306
|
+
* Controls which UI elements are visible.
|
|
307
|
+
* When using this, specify all elements - unspecified default to false.
|
|
308
|
+
*
|
|
309
|
+
* @platform android
|
|
310
|
+
*/
|
|
311
|
+
uiConfig?: JWUiConfig;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Whether to show player controls
|
|
315
|
+
*
|
|
316
|
+
* @default true
|
|
317
|
+
* @platforms iOS, Android
|
|
318
|
+
*/
|
|
319
|
+
controls?: boolean;
|
|
320
|
+
|
|
321
|
+
// ========== AUDIO SESSION (iOS only) ==========
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Enable background audio playback
|
|
325
|
+
*
|
|
326
|
+
* @platform ios
|
|
327
|
+
*/
|
|
328
|
+
backgroundAudioEnabled?: boolean;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Audio session category
|
|
332
|
+
*
|
|
333
|
+
* Controls how the app's audio interacts with other audio.
|
|
334
|
+
*
|
|
335
|
+
* @platform ios
|
|
336
|
+
*/
|
|
337
|
+
category?: AudioSessionCategory;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Audio session category options
|
|
341
|
+
*
|
|
342
|
+
* Modifies the behavior of the audio session category.
|
|
343
|
+
*
|
|
344
|
+
* @platform ios
|
|
345
|
+
*/
|
|
346
|
+
categoryOptions?: AudioSessionCategoryOptions[];
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Audio session mode
|
|
350
|
+
*
|
|
351
|
+
* Specialized modes for specific use cases.
|
|
352
|
+
*
|
|
353
|
+
* @platform ios
|
|
354
|
+
*/
|
|
355
|
+
mode?: AudioSessionMode;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Interface behavior mode
|
|
359
|
+
*
|
|
360
|
+
* @platform ios
|
|
361
|
+
*/
|
|
362
|
+
interfaceBehavior?: InterfaceBehavior;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Delay before interface fades out (in seconds)
|
|
366
|
+
*
|
|
367
|
+
* @platform ios
|
|
368
|
+
*/
|
|
369
|
+
interfaceFadeDelay?: number;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* UI groups to hide
|
|
373
|
+
*
|
|
374
|
+
* @platform ios
|
|
375
|
+
*/
|
|
376
|
+
hideUIGroups?: UIGroup[];
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* FairPlay certificate URL for DRM
|
|
380
|
+
*
|
|
381
|
+
* @platform ios
|
|
382
|
+
*/
|
|
383
|
+
fairplayCertUrl?: string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Alternative naming for fairplayCertUrl
|
|
387
|
+
*
|
|
388
|
+
* @platform ios
|
|
389
|
+
*/
|
|
390
|
+
certificateUrl?: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Process SPC URL for FairPlay DRM
|
|
394
|
+
*
|
|
395
|
+
* @platform ios
|
|
396
|
+
*/
|
|
397
|
+
processSpcUrl?: string;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Content UUID for DRM
|
|
401
|
+
*
|
|
402
|
+
* @platform ios
|
|
403
|
+
*/
|
|
404
|
+
contentUUID?: string;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* View-only mode (no interaction)
|
|
408
|
+
*
|
|
409
|
+
* @platform ios
|
|
410
|
+
*/
|
|
411
|
+
viewOnly?: boolean;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Offline message to display when offline
|
|
415
|
+
*
|
|
416
|
+
* @platform ios
|
|
417
|
+
*/
|
|
418
|
+
offlineMessage?: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Offline image to display when offline
|
|
422
|
+
*
|
|
423
|
+
* @platform ios
|
|
424
|
+
*/
|
|
425
|
+
offlineImage?: string;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Force fullscreen when device is in landscape
|
|
429
|
+
*
|
|
430
|
+
* @platform ios
|
|
431
|
+
*/
|
|
432
|
+
forceFullScreenOnLandscape?: boolean;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Force landscape when entering fullscreen
|
|
436
|
+
*
|
|
437
|
+
* @platform ios
|
|
438
|
+
*/
|
|
439
|
+
forceLandscapeOnFullScreen?: boolean;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* External playback settings (AirPlay)
|
|
443
|
+
*
|
|
444
|
+
* @platform ios
|
|
445
|
+
*/
|
|
446
|
+
externalPlaybackSettings?: JWExternalPlaybackSettings;
|
|
447
|
+
|
|
448
|
+
// ========== ANDROID-SPECIFIC ==========
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Use TextureView instead of SurfaceView
|
|
452
|
+
*
|
|
453
|
+
* @platform android
|
|
454
|
+
*/
|
|
455
|
+
useTextureView?: boolean;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Allow cross-protocol redirects (HTTP to HTTPS)
|
|
459
|
+
*
|
|
460
|
+
* @platform android
|
|
461
|
+
*/
|
|
462
|
+
allowCrossProtocolRedirectsSupport?: boolean;
|
|
463
|
+
|
|
464
|
+
// ========== WRAPPER-SPECIFIC (Not in JSON parsers) ==========
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Force use of legacy configuration builder instead of JSON parser
|
|
468
|
+
*
|
|
469
|
+
* When true, bypasses native JSON parsers and uses custom builder logic.
|
|
470
|
+
*
|
|
471
|
+
* @default false
|
|
472
|
+
*/
|
|
473
|
+
forceLegacyConfig?: boolean;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Enable playlist item callback functionality
|
|
477
|
+
*
|
|
478
|
+
* If true, `onBeforeNextPlaylistItem` MUST be implemented with
|
|
479
|
+
* `player.resolveNextPlaylistItem()` called in the callback or content will hang.
|
|
480
|
+
*
|
|
481
|
+
* @default false
|
|
482
|
+
*/
|
|
483
|
+
playlistItemCallbackEnabled?: boolean;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Whether player is displayed in a modal
|
|
487
|
+
*
|
|
488
|
+
* Affects fullscreen behavior.
|
|
489
|
+
*/
|
|
490
|
+
playerInModal?: boolean;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Enter fullscreen when device rotates to landscape
|
|
494
|
+
*/
|
|
495
|
+
fullScreenOnLandscape?: boolean;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Rotate device to landscape when entering fullscreen
|
|
499
|
+
*/
|
|
500
|
+
landscapeOnFullScreen?: boolean;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Rotate device to portrait when exiting fullscreen
|
|
504
|
+
*/
|
|
505
|
+
portraitOnExitFullScreen?: boolean;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Exit fullscreen when device rotates to portrait
|
|
509
|
+
*/
|
|
510
|
+
exitFullScreenOnPortrait?: boolean;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Enable lock screen controls (iOS)
|
|
514
|
+
*
|
|
515
|
+
* @platform ios
|
|
516
|
+
*/
|
|
517
|
+
enableLockScreenControls?: boolean;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Enable Picture-in-Picture support
|
|
521
|
+
*/
|
|
522
|
+
pipEnabled?: boolean;
|
|
523
|
+
|
|
524
|
+
// ========== LEGACY PROPERTIES (for single-item configs) ==========
|
|
525
|
+
// These are applied when using `file` or `sources` instead of `playlist`
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Title of the media item
|
|
529
|
+
*/
|
|
530
|
+
title?: string;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Description of the media item
|
|
534
|
+
*/
|
|
535
|
+
description?: string;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* URL of the poster image
|
|
539
|
+
*/
|
|
540
|
+
image?: string;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Array of caption, thumbnail, or chapter tracks
|
|
544
|
+
*/
|
|
545
|
+
tracks?: JWTrack[];
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Start time in seconds
|
|
549
|
+
*/
|
|
550
|
+
starttime?: number;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Media identifier
|
|
554
|
+
*/
|
|
555
|
+
mediaid?: string;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Alternative camelCase naming for mediaid
|
|
559
|
+
*/
|
|
560
|
+
mediaId?: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Type guard to check if advertising config is IMA DAI
|
|
565
|
+
*/
|
|
566
|
+
export function isImaDaiAdvertising(
|
|
567
|
+
advertising: JWAdvertisingConfig
|
|
568
|
+
): advertising is import('./advertising').ImaDaiAdvertisingConfig {
|
|
569
|
+
return (
|
|
570
|
+
advertising.client === 'dai' ||
|
|
571
|
+
advertising.client === 'GoogleIMADAI' ||
|
|
572
|
+
advertising.client === 'IMA_DAI'
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Type guard to check if playlist is an array of items
|
|
578
|
+
*/
|
|
579
|
+
export function isPlaylistArray(
|
|
580
|
+
playlist: Playlist
|
|
581
|
+
): playlist is JWPlaylistItem[] {
|
|
582
|
+
return Array.isArray(playlist);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Type guard to check if playlist is a URL string
|
|
587
|
+
*/
|
|
588
|
+
export function isPlaylistUrl(playlist: Playlist): playlist is string {
|
|
589
|
+
return typeof playlist === 'string';
|
|
590
|
+
}
|
|
591
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|