diff --git a/test/builder.go b/test/builder.go index b9700f61..69233689 100644 --- a/test/builder.go +++ b/test/builder.go @@ -60,6 +60,8 @@ type publishOptions struct { videoRepublish time.Duration videoOnly bool videoTrackID string + + layout string } type fileOptions struct { @@ -92,7 +94,7 @@ func (r *Runner) build(test *testCase) *rpc.StartEgressRequest { case types.RequestTypeRoomComposite: room := &livekit.RoomCompositeEgressRequest{ RoomName: r.RoomName, - Layout: "speaker", + Layout: test.layout, AudioOnly: test.audioOnly, VideoOnly: test.videoOnly, } diff --git a/test/ffprobe.go b/test/ffprobe.go index 09ccab32..e8493638 100644 --- a/test/ffprobe.go +++ b/test/ffprobe.go @@ -122,7 +122,7 @@ func verify(t *testing.T, in string, p *config.PipelineConfig, res *livekit.Egre } // Check source type - if p.RequestType == types.RequestTypeRoomComposite && p.VideoEnabled { + if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") { require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType) } else { require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType) diff --git a/test/file.go b/test/file.go index 8e4dae63..7321a45a 100644 --- a/test/file.go +++ b/test/file.go @@ -44,6 +44,7 @@ func (r *Runner) testFile(t *testing.T) { requestType: types.RequestTypeRoomComposite, publishOptions: publishOptions{ audioCodec: types.MimeTypeOpus, videoCodec: types.MimeTypeH264, + layout: "speaker", }, fileOptions: &fileOptions{ filename: "r_{room_name}_{time}.mp4", @@ -54,6 +55,7 @@ func (r *Runner) testFile(t *testing.T) { requestType: types.RequestTypeRoomComposite, publishOptions: publishOptions{ videoCodec: types.MimeTypeH264, videoOnly: true, + layout: "speaker", }, encodingOptions: &livekit.EncodingOptions{ VideoCodec: livekit.VideoCodec_H264_HIGH, diff --git a/test/images.go b/test/images.go index 5d39a0d1..cfe34a9c 100644 --- a/test/images.go +++ b/test/images.go @@ -45,6 +45,7 @@ func (r *Runner) testImages(t *testing.T) { publishOptions: publishOptions{ audioCodec: types.MimeTypeOpus, videoCodec: types.MimeTypeH264, + layout: "speaker", }, encodingOptions: &livekit.EncodingOptions{ Width: 640, diff --git a/test/segments.go b/test/segments.go index 33897ce5..bf672767 100644 --- a/test/segments.go +++ b/test/segments.go @@ -48,6 +48,7 @@ func (r *Runner) testSegments(t *testing.T) { publishOptions: publishOptions{ audioCodec: types.MimeTypeOpus, videoCodec: types.MimeTypeVP8, + layout: "speaker", }, encodingOptions: &livekit.EncodingOptions{ AudioCodec: livekit.AudioCodec_AAC, diff --git a/test/stream.go b/test/stream.go index e66772a6..a23263dd 100644 --- a/test/stream.go +++ b/test/stream.go @@ -91,6 +91,7 @@ func (r *Runner) testStream(t *testing.T) { publishOptions: publishOptions{ audioCodec: types.MimeTypeOpus, videoCodec: types.MimeTypeVP8, + layout: "speaker", }, streamOptions: &streamOptions{ streamUrls: []string{rtmpUrl1, badRtmpUrl1},