mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
15 lines
670 B
JavaScript
15 lines
670 B
JavaScript
const streamingServerAPIAddress = process.env.STREAMING_API_SERVER ?? ""
|
|
|
|
const streamingServerAPIUri = `${streamingServerAPIAddress.startsWith("https") ? "https" : "http"}://${streamingServerAPIAddress.split("://")[1]}`
|
|
|
|
export default (username, profile_id) => {
|
|
const streamId = `${username}${profile_id ? `:${profile_id}` : ""}`
|
|
|
|
return {
|
|
ingest: process.env.STREAMING_INGEST_SERVER,
|
|
rtmp: `${streamingServerAPIUri}/${streamId}`,
|
|
hls: `${streamingServerAPIUri}/stream/${streamId}/src.m3u8`,
|
|
flv: `${streamingServerAPIUri}/stream/${streamId}/src.flv`,
|
|
aac: `${streamingServerAPIUri}/stream/${streamId}/src.aac`,
|
|
}
|
|
} |