Skip to content

Commit

Permalink
Apply advanced json templates to hls video
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Bats committed Mar 1, 2024
1 parent fa06071 commit 5b498ac
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ private fun String.applyTemplate(valueProvider: (String) -> String?) =
private fun MediaType.applyTemplate(valueProvider: (String) -> String?) = when (this) {
is MediaType.Photo -> copy(url = url.applyTemplate(valueProvider))
is MediaType.Video -> copy(url = url.applyTemplate(valueProvider))
is MediaType.HLSVideo -> copy(
url = url.applyTemplate(valueProvider),
jwtToken = jwtToken?.applyTemplate(valueProvider)
)
is MediaType.Object -> copy(url = url.applyTemplate(valueProvider))
is MediaType.WebRTCProxyConnection -> copy(url = url.applyTemplate(valueProvider))
is MediaType.WebRTCGrabberConnection -> copy(
Expand Down Expand Up @@ -384,4 +388,4 @@ private fun List<TeamInfo>.mergeTeams(overrides: Map<String, TeamInfoOverride>?)
)
}

private val logger = getLogger(AdvancedPropertiesAdapter::class)
private val logger = getLogger(AdvancedPropertiesAdapter::class)

0 comments on commit 5b498ac

Please sign in to comment.