@@ -565,6 +565,13 @@ export namespace Asset {
565
565
}
566
566
567
567
export interface AssetOptions {
568
+ /**
569
+ * An array of playback policy objects that you want applied to this asset and
570
+ * available through `playback_ids`. `advanced_playback_policy` must be used
571
+ * instead of `playback_policy` when creating a DRM playback ID.
572
+ */
573
+ advanced_playback_policy ?: Array < AssetOptions . AdvancedPlaybackPolicy > ;
574
+
568
575
/**
569
576
* The encoding tier informs the cost, quality, and available platform features for
570
577
* the asset. By default the `smart` encoding tier is used.
@@ -642,12 +649,14 @@ export interface AssetOptions {
642
649
643
650
/**
644
651
* An array of playback policy names that you want applied to this asset and
645
- * available through `playback_ids`. Options include: `"public"` (anyone with the
646
- * playback URL can stream the asset). And `"signed"` (an additional access token
647
- * is required to play the asset). If no playback_policy is set, the asset will
648
- * have no playback IDs and will therefore not be playable. For simplicity, a
649
- * single string name can be used in place of the array in the case of only one
650
- * playback policy.
652
+ * available through `playback_ids`. Options include:
653
+ *
654
+ * - `"public"` (anyone with the playback URL can stream the asset).
655
+ * - `"signed"` (an additional access token is required to play the asset).
656
+ *
657
+ * If no `playback_policy` is set, the asset will have no playback IDs and will
658
+ * therefore not be playable. For simplicity, a single string name can be used in
659
+ * place of the array in the case of only one playback policy.
651
660
*/
652
661
playback_policy ?: Array < Shared . PlaybackPolicy > ;
653
662
@@ -661,6 +670,25 @@ export interface AssetOptions {
661
670
}
662
671
663
672
export namespace AssetOptions {
673
+ export interface AdvancedPlaybackPolicy {
674
+ /**
675
+ * The DRM configuration used by this playback ID. Must only be set when `policy`
676
+ * is set to `drm`.
677
+ */
678
+ drm_configuration_id ?: string ;
679
+
680
+ /**
681
+ * - `public` playback IDs are accessible by constructing an HLS URL like
682
+ * `https://stream.mux.com/${PLAYBACK_ID}`
683
+ *
684
+ * - `signed` playback IDs should be used with tokens
685
+ * `https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}`. See
686
+ * [Secure video playback](https://docs.mux.com/guides/secure-video-playback) for
687
+ * details about creating tokens.
688
+ */
689
+ policy ?: Shared . PlaybackPolicy ;
690
+ }
691
+
664
692
/**
665
693
* An array of objects that each describe an input file to be used to create the
666
694
* asset. As a shortcut, `input` can also be a string URL for a file when only one
@@ -1264,6 +1292,13 @@ export interface AssetCreateParams {
1264
1292
*/
1265
1293
input : Array < AssetCreateParams . Input > ;
1266
1294
1295
+ /**
1296
+ * An array of playback policy objects that you want applied to this asset and
1297
+ * available through `playback_ids`. `advanced_playback_policy` must be used
1298
+ * instead of `playback_policy` when creating a DRM playback ID.
1299
+ */
1300
+ advanced_playback_policy ?: Array < AssetCreateParams . AdvancedPlaybackPolicy > ;
1301
+
1267
1302
/**
1268
1303
* The encoding tier informs the cost, quality, and available platform features for
1269
1304
* the asset. By default the `smart` encoding tier is used.
@@ -1331,12 +1366,14 @@ export interface AssetCreateParams {
1331
1366
1332
1367
/**
1333
1368
* An array of playback policy names that you want applied to this asset and
1334
- * available through `playback_ids`. Options include: `"public"` (anyone with the
1335
- * playback URL can stream the asset). And `"signed"` (an additional access token
1336
- * is required to play the asset). If no playback_policy is set, the asset will
1337
- * have no playback IDs and will therefore not be playable. For simplicity, a
1338
- * single string name can be used in place of the array in the case of only one
1339
- * playback policy.
1369
+ * available through `playback_ids`. Options include:
1370
+ *
1371
+ * - `"public"` (anyone with the playback URL can stream the asset).
1372
+ * - `"signed"` (an additional access token is required to play the asset).
1373
+ *
1374
+ * If no `playback_policy` is set, the asset will have no playback IDs and will
1375
+ * therefore not be playable. For simplicity, a single string name can be used in
1376
+ * place of the array in the case of only one playback policy.
1340
1377
*/
1341
1378
playback_policy ?: Array < Shared . PlaybackPolicy > ;
1342
1379
@@ -1562,6 +1599,25 @@ export namespace AssetCreateParams {
1562
1599
width ?: string ;
1563
1600
}
1564
1601
}
1602
+
1603
+ export interface AdvancedPlaybackPolicy {
1604
+ /**
1605
+ * The DRM configuration used by this playback ID. Must only be set when `policy`
1606
+ * is set to `drm`.
1607
+ */
1608
+ drm_configuration_id ?: string ;
1609
+
1610
+ /**
1611
+ * - `public` playback IDs are accessible by constructing an HLS URL like
1612
+ * `https://stream.mux.com/${PLAYBACK_ID}`
1613
+ *
1614
+ * - `signed` playback IDs should be used with tokens
1615
+ * `https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}`. See
1616
+ * [Secure video playback](https://docs.mux.com/guides/secure-video-playback) for
1617
+ * details about creating tokens.
1618
+ */
1619
+ policy ?: Shared . PlaybackPolicy ;
1620
+ }
1565
1621
}
1566
1622
1567
1623
export interface AssetUpdateParams {
@@ -1585,6 +1641,12 @@ export interface AssetListParams extends BasePageParams {
1585
1641
}
1586
1642
1587
1643
export interface AssetCreatePlaybackIDParams {
1644
+ /**
1645
+ * The DRM configuration used by this playback ID. Must only be set when `policy`
1646
+ * is set to `drm`.
1647
+ */
1648
+ drm_configuration_id ?: string ;
1649
+
1588
1650
/**
1589
1651
* - `public` playback IDs are accessible by constructing an HLS URL like
1590
1652
* `https://stream.mux.com/${PLAYBACK_ID}`
0 commit comments