lbry-desktop/ui/util/lbrytv.js
2019-12-17 00:57:13 -05:00

13 lines
448 B
JavaScript

const { URL } = require('../../config');
function generateStreamUrl(claimName, claimId, apiUrl) {
const prefix = process.env.SDK_API_URL || apiUrl;
return `${prefix}/content/claims/${claimName}/${claimId}/stream`;
}
function generateEmbedUrl(claimName, claimId) {
return `${URL}/embed/${claimName}/${claimId}`;
}
// module.exports needed since the web server imports this function
module.exports = { generateStreamUrl, generateEmbedUrl };