@@ -625,44 +625,63 @@ fun Broadcast.Builder.addRtmpStream(properties: Rtmp.Builder.() -> Unit): Broadc
625
625
fun Broadcast.Builder.hls (properties : Hls .Builder .() -> Unit = {}): Broadcast .Builder =
626
626
hls(Hls .builder().apply (properties).build())
627
627
628
+
628
629
/* *
629
- * Sets the layout for a composed archive. If this option is specified,
630
- * [Archive.Builder.outputMode] must be set to [OutputMode.COMPOSED].
630
+ * Sets the layout for a composed archive.
631
+ *
632
+ * @param initialLayout The layout type to use for the archive as an enum.
631
633
*
632
- * @param initialLayout The layout type to use for the archive as an enum. If set to
633
- * [ScreenLayoutType.CUSTOM], then you must also set the `stylesheet` property.
634
+ * @return The updated archive builder.
635
+ */
636
+ fun Archive.Builder.standardLayout (initialLayout : ScreenLayoutType ): Archive .Builder =
637
+ layout(streamCompositionLayout(initialLayout, null , null ))
638
+
639
+ /* *
640
+ * Sets the layout for a composed archive to [ScreenLayoutType.BEST_FIT].
634
641
*
635
- * @param screenshareType (OPTIONAL) The layout type to use when there is a screen-sharing stream in the
636
- * session. Note if you set this property, then `initialLayout` must be set to [ScreenLayoutType.BEST_FIT]
637
- * and you must leave the `stylesheet` property unset (null).
642
+ * @param screenshareType The layout type to use when there is a screen-sharing stream in the session.
643
+ *
644
+ * @return The updated archive builder.
645
+ */
646
+ fun Archive.Builder.screenshareLayout (screenshareType : ScreenLayoutType ): Archive .Builder =
647
+ layout(streamCompositionLayout(ScreenLayoutType .BEST_FIT , screenshareType, null ))
648
+
649
+ /* *
650
+ * Sets the layout for a composed archive to [ScreenLayoutType.CUSTOM].
638
651
*
639
- * @param stylesheet (OPTIONAL) The CSS stylesheet to use for the archive. If you set this property,
640
- * then `initialLayout` must be set to [ScreenLayoutType.CUSTOM].
652
+ * @param stylesheet The CSS stylesheet to use for the archive.
641
653
*
642
654
* @return The updated archive builder.
643
655
*/
644
- fun Archive.Builder.layout (initialLayout : ScreenLayoutType ,
645
- screenshareType : ScreenLayoutType ? = null,
646
- stylesheet : String? = null): Archive .Builder =
647
- layout(streamCompositionLayout(initialLayout, screenshareType, stylesheet))
656
+ fun Archive.Builder.customLayout (stylesheet : String ): Archive .Builder =
657
+ layout(streamCompositionLayout(ScreenLayoutType .CUSTOM , null , stylesheet))
648
658
649
659
/* *
650
- * Specify this to assign the initial layout type for the broadcast. If you do not specify an initial layout type,
651
- * the broadcast stream uses [ScreenLayoutType.BEST_FIT] as the default layout type.
660
+ * Specify this to assign the initial layout type for the broadcast.
652
661
*
653
- * @param initialLayout The layout type to use for the broadcast as an enum. If set to
654
- * [ScreenLayoutType.CUSTOM], then you must also set the `stylesheet` property.
662
+ * @param initialLayout The layout type to use for the broadcast as an enum.
655
663
*
656
- * @param screenshareType (OPTIONAL) The layout type to use when there is a screen-sharing stream in the
657
- * session. Note if you set this property, then `initialLayout` must be set to [ScreenLayoutType.BEST_FIT]
658
- * and you must leave the `stylesheet` property unset (null).
664
+ * @return The updated broadcast builder.
665
+ */
666
+ fun Broadcast.Builder.standardLayout (initialLayout : ScreenLayoutType ): Broadcast .Builder =
667
+ layout(streamCompositionLayout(initialLayout, null , null ))
668
+
669
+ /* *
670
+ * Sets the layout for the broadcast to [ScreenLayoutType.BEST_FIT].
671
+ *
672
+ * @param screenshareType The layout type to use when there is a screen-sharing stream in the session.
673
+ *
674
+ * @return The updated broadcast builder.
675
+ */
676
+ fun Broadcast.Builder.screenshareLayout (screenshareType : ScreenLayoutType ): Broadcast .Builder =
677
+ layout(streamCompositionLayout(ScreenLayoutType .BEST_FIT , screenshareType, null ))
678
+
679
+ /* *
680
+ * Sets the layout for the broadcast to [ScreenLayoutType.CUSTOM].
659
681
*
660
- * @param stylesheet (OPTIONAL) The CSS stylesheet to use for the broadcast. If you set this property,
661
- * then `initialLayout` must be set to [ScreenLayoutType.CUSTOM].
682
+ * @param stylesheet The CSS stylesheet to use for the broadcast.
662
683
*
663
684
* @return The updated broadcast builder.
664
685
*/
665
- fun Broadcast.Builder.layout (initialLayout : ScreenLayoutType = ScreenLayoutType .BEST_FIT ,
666
- screenshareType : ScreenLayoutType ? = null,
667
- stylesheet : String? = null): Broadcast .Builder =
668
- layout(streamCompositionLayout(initialLayout, screenshareType, stylesheet))
686
+ fun Broadcast.Builder.customLayout (stylesheet : String ): Broadcast .Builder =
687
+ layout(streamCompositionLayout(ScreenLayoutType .CUSTOM , null , stylesheet))
0 commit comments