mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
Log basurl
This commit is contained in:
parent
153be7cb20
commit
be72bd2c11
@ -63,6 +63,7 @@ const VideoForm = ({ draft = null }) => {
|
||||
}
|
||||
else if (videoUrl.includes('.mp4') || videoUrl.includes('.mov') || videoUrl.includes('.avi') || videoUrl.includes('.wmv') || videoUrl.includes('.flv') || videoUrl.includes('.webm')) {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000";
|
||||
console.log("BASE URL", baseUrl);
|
||||
const videoEmbed = `<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;"><video src="${baseUrl}/api/get-video-url?videoKey=${encodeURIComponent(videoUrl)}" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;" controls></video></div>`;
|
||||
embedCode = videoEmbed;
|
||||
}
|
||||
|
@ -220,7 +220,8 @@ export default function Draft() {
|
||||
// todo update this for dev and prod
|
||||
const extractedVideoId = draft.content.split('?videoKey=')[1].split('"')[0];
|
||||
videoId = extractedVideoId;
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000"
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000";
|
||||
console.log("BASE URL", baseUrl);
|
||||
const videoEmbed = `<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;"><video src="${baseUrl}/api/get-video-url?videoKey=${encodeURIComponent(extractedVideoId)}" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;" controls></video></div>`;
|
||||
if (draft?.price) {
|
||||
const encryptedVideoUrl = await encryptContent(videoEmbed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user