2019-12-16 18:44:31 +01:00
|
|
|
const { URL } = require('../../config');
|
|
|
|
|
2019-10-29 17:23:56 +01:00
|
|
|
function generateStreamUrl(claimName, claimId, apiUrl) {
|
|
|
|
const prefix = process.env.SDK_API_URL || apiUrl;
|
2019-10-21 16:50:34 +02:00
|
|
|
return `${prefix}/content/claims/${claimName}/${claimId}/stream`;
|
|
|
|
}
|
2019-10-22 16:40:57 +02:00
|
|
|
|
2019-12-16 18:44:31 +01:00
|
|
|
function generateEmbedUrl(claimName, claimId) {
|
|
|
|
return `${URL}/embed/${claimName}/${claimId}`;
|
|
|
|
}
|
|
|
|
|
2019-11-07 20:39:22 +01:00
|
|
|
// module.exports needed since the web server imports this function
|
2019-12-16 18:44:31 +01:00
|
|
|
module.exports = { generateStreamUrl, generateEmbedUrl };
|