@vindral/web-sdk 3.3.0 → 3.3.1
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 +2 -0
- package/index.d.ts +81 -0
- package/index.js +1986 -1868
- package/index.umd.cjs +5 -5
- package/package.json +1 -1
- package/style.css +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ Make sure to check out the [Web SDK guides](https://docs.vindral.com/playout/web
|
|
|
10
10
|
|
|
11
11
|
[Check out our demo](https://demo.vindral.com/) to see some of Vindral's features.
|
|
12
12
|
|
|
13
|
+
For detailed information about our latest updates, visit the [changelog](https://docs.vindral.com/web-sdk/changelog/).
|
|
14
|
+
|
|
13
15
|
## Getting Started
|
|
14
16
|
|
|
15
17
|
There are multiple ways to integrate the Web SDK, depending on the use case.
|
package/index.d.ts
CHANGED
|
@@ -368,6 +368,7 @@ interface ClientOverrides {
|
|
|
368
368
|
burstEnabled?: boolean;
|
|
369
369
|
sizeBasedResolutionCapEnabled?: boolean;
|
|
370
370
|
separateVideoSocketEnabled?: boolean;
|
|
371
|
+
videoCodecs?: string[];
|
|
371
372
|
}
|
|
372
373
|
interface ChannelWithRenditionsAndOverrides extends Channel {
|
|
373
374
|
renditions: Rendition[];
|
|
@@ -1453,6 +1454,73 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
|
1453
1454
|
private timeToFirstFrame;
|
|
1454
1455
|
private willUseMediaSource;
|
|
1455
1456
|
}
|
|
1457
|
+
interface AirPlaySenderEvents {
|
|
1458
|
+
/**
|
|
1459
|
+
* When airplay targets are available.
|
|
1460
|
+
*/
|
|
1461
|
+
["available"]: void;
|
|
1462
|
+
/**
|
|
1463
|
+
* When a connection has been established with an airplay target.
|
|
1464
|
+
*/
|
|
1465
|
+
["connected"]: void;
|
|
1466
|
+
/**
|
|
1467
|
+
* When the airplay target has lost or stopped a connection.
|
|
1468
|
+
*/
|
|
1469
|
+
["disconnected"]: void;
|
|
1470
|
+
}
|
|
1471
|
+
interface AirPlayConfig {
|
|
1472
|
+
/**
|
|
1473
|
+
* URL to use when connecting to the stream.
|
|
1474
|
+
*/
|
|
1475
|
+
url: string;
|
|
1476
|
+
/**
|
|
1477
|
+
* Channel ID to connect to.
|
|
1478
|
+
*/
|
|
1479
|
+
channelId: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* A container to attach the video element in. This should be the same container that the vindral video element is attached to.
|
|
1482
|
+
*/
|
|
1483
|
+
container: HTMLElement;
|
|
1484
|
+
/**
|
|
1485
|
+
* An authentication token to provide to the server when connecting - only needed for channels with authentication enabled
|
|
1486
|
+
* Note: If not supplied when needed, an "Authentication Failed" error will be raised.
|
|
1487
|
+
*/
|
|
1488
|
+
authenticationToken?: string;
|
|
1489
|
+
}
|
|
1490
|
+
declare class AirPlaySender extends Emitter<AirPlaySenderEvents> {
|
|
1491
|
+
private config;
|
|
1492
|
+
private hlsUrl;
|
|
1493
|
+
private element;
|
|
1494
|
+
private connectingTimeout?;
|
|
1495
|
+
private browser;
|
|
1496
|
+
constructor(config: AirPlayConfig);
|
|
1497
|
+
/**
|
|
1498
|
+
* True if the instance is casting right now.
|
|
1499
|
+
*/
|
|
1500
|
+
get casting(): boolean;
|
|
1501
|
+
/**
|
|
1502
|
+
* Set the current channelId.
|
|
1503
|
+
*/
|
|
1504
|
+
set channelId(channelId: string);
|
|
1505
|
+
/**
|
|
1506
|
+
* Update authentication token on an already established and authenticated connection.
|
|
1507
|
+
*/
|
|
1508
|
+
updateAuthenticationToken: (_token: string) => void;
|
|
1509
|
+
/**
|
|
1510
|
+
* Fully unloads the instance. This disconnects the current listeners.
|
|
1511
|
+
*/
|
|
1512
|
+
unload: () => void;
|
|
1513
|
+
/**
|
|
1514
|
+
* Show the AirPlay picker.
|
|
1515
|
+
*/
|
|
1516
|
+
showPlaybackTargetPicker(): void;
|
|
1517
|
+
/**
|
|
1518
|
+
* Returns if AirPlay is supported.
|
|
1519
|
+
*/
|
|
1520
|
+
static isAirPlaySupported(): boolean;
|
|
1521
|
+
private onAirPlayAvailable;
|
|
1522
|
+
private onAirPlayPlaybackChanged;
|
|
1523
|
+
}
|
|
1456
1524
|
/**
|
|
1457
1525
|
* Available options when initializing the Player. Used for enabling/disabling features
|
|
1458
1526
|
* and hiding/showing buttons in the control pane
|
|
@@ -1527,6 +1595,10 @@ export interface PlayerOptions {
|
|
|
1527
1595
|
* Enable or disable the pause and play button
|
|
1528
1596
|
*/
|
|
1529
1597
|
pauseButtonEnabled?: boolean;
|
|
1598
|
+
/**
|
|
1599
|
+
* Enable or disable the AirPlay button
|
|
1600
|
+
*/
|
|
1601
|
+
airPlayButtonEnabled?: boolean;
|
|
1530
1602
|
}
|
|
1531
1603
|
/**
|
|
1532
1604
|
* Represents a Vindral player
|
|
@@ -1548,6 +1620,10 @@ export declare class Player {
|
|
|
1548
1620
|
* The CastSender instance
|
|
1549
1621
|
*/
|
|
1550
1622
|
readonly castSender: CastSender;
|
|
1623
|
+
/**
|
|
1624
|
+
* The AirPlaySender instance
|
|
1625
|
+
*/
|
|
1626
|
+
readonly airPlaySender?: AirPlaySender;
|
|
1551
1627
|
private options;
|
|
1552
1628
|
private state;
|
|
1553
1629
|
private playerElement;
|
|
@@ -1569,6 +1645,7 @@ export declare class Player {
|
|
|
1569
1645
|
*/
|
|
1570
1646
|
attach: (container: HTMLElement) => void;
|
|
1571
1647
|
private setupCastSender;
|
|
1648
|
+
private setupAirPlaySender;
|
|
1572
1649
|
private onMouseMove;
|
|
1573
1650
|
private onClick;
|
|
1574
1651
|
private togglePip;
|
|
@@ -1595,6 +1672,10 @@ export declare class Player {
|
|
|
1595
1672
|
* Exit fullscreen mode
|
|
1596
1673
|
*/
|
|
1597
1674
|
exitFullscreen: () => Promise<void>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Show the AirPlay picker
|
|
1677
|
+
*/
|
|
1678
|
+
showAirPlayPicker: () => void;
|
|
1598
1679
|
private lockOrientation;
|
|
1599
1680
|
private unlockOrientation;
|
|
1600
1681
|
private checkState;
|