Skip to content

Conversation

1egoman
Copy link
Contributor

@1egoman 1egoman commented Sep 26, 2025

Adds the ability to copy embed code with a button from the welcome page.

iFrame embed:
Screenshot 2025-09-26 at 3 28 31 PM

Popup embed:
Screenshot 2025-09-26 at 3 28 36 PM

Copy link

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
agent-starter-embed Ready Ready Preview Comment Sep 26, 2025 7:30pm

Comment on lines +126 to +144
{iframeEmbedCode.split(iframeEmbedUrl).map((stringPart, index) => {
if (index === 0) {
return <span key={index}>{stringPart}</span>;
}

return (
<span key={index}>
<a
href={iframeEmbedUrl}
target="_blank"
rel="noopener noreferrer"
className="text-primary underline"
>
{iframeEmbedUrl}
</a>
{stringPart}
</span>
);
})}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I did here was a little weird... by splitting the embed code string on the iframeEmbedUrl, it gave me all the parts around any embed url instances. Then, between each occurrence, I inserted the a tag to maintain the previous behavior where the url was linked.

I tried a few other things but couldn't find come up with something that was cleaner - if you've got a better suggestion, let me know!

Copy link
Contributor

@thomasyuill-livekit thomasyuill-livekit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @1egoman

@1egoman 1egoman merged commit c524001 into main Sep 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants