Skip to content

Commit

Permalink
gumlet
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Jun 24, 2024
1 parent 3462d68 commit 81520bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion components/Editor/CustomExtensions/Figure2/Figure.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ const Figure = Node.create({
.run()
);
} else if (attrs.figureType == "video") {
console.log(attrs)
const content = [{ type: "video", attrs }];

// if (caption) {
Expand Down
15 changes: 7 additions & 8 deletions components/Editor/CustomExtensions/Video/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ const Video = Node.create({
},

renderHTML({ HTMLAttributes }) {
console.log(HTMLAttributes)
if (HTMLAttributes.gumlet) {
let gumletJSON = JSON.parse(HTMLAttributes.gumlet);
console.log(gumletJSON)
// if (gumletJSON.output?.playback_url) {
// HTMLAttributes.src = gumletJSON.output?.playback_url;
// }
}

// if (HTMLAttributes.gumlet) {
// let gumletJSON = JSON.parse(HTMLAttributes.gumlet);
// if (gumletJSON.output?.playback_url) {
// HTMLAttributes.src = gumletJSON.output?.playback_url;
// }
// }

return ["video", mergeAttributes(HTMLAttributes)];
},
Expand Down
Empty file.
6 changes: 3 additions & 3 deletions pages/api/post/uploadVideoToGumlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ async function handler(req, res) {
headers: {
accept: "application/json",
"content-type": "application/json",
Authorization: "Bearer [bearer otken here]",
Authorization: `Bearer ${process.env.GUMLET_API_KEY}`,
},
body: JSON.stringify({
format: "ABR",
format: "MP4",
input: videoUrl,
collection_id: "[collection id here]",
collection_id: process.env.GUMLET_COLLECTION_ID,
}),
};

Expand Down

0 comments on commit 81520bd

Please sign in to comment.