how do i make it so that when a user posts a link to a youtube video, the youtube video is automatically embedded like on twitter, rather than a link showing up?
is it even possible with the youtube link being posted using a text input?
how do i make it so that when a user posts a link to a youtube video, the youtube video is automatically embedded like on twitter, rather than a link showing up?
is it even possible with the youtube link being posted using a text input?
ok i found this solution.
i initially had my repeating group display text based messages that the user would post.
so obviously without a video container, the youtube urls would appear as texts.
i added a video container and for the video ID I chose current cells’ message text.
so now the video container displays the video.
but now the problem is that the text still displays with the youtube url link. how do i implement a condition so that if the text contains a url, the text isnt visible?
i also need to figure out a way to make the video appear conditionally when a link exists, only. so it doesnt show the empty video container.
ok, i found a regex that replaces the text with a blank if it contains a url, but now i have an issue with the video container appearing and i need the video container to be conditional so that it is only visible if the text contains a url, i suppose its another regex but i dont know how to implement that condition.
but now i have a problem with the regex finding and replacing all of text, even if it doesnt contain a url, so now i am not sure what to do, but i guess i have to take out the regex.
deciced to try a workflow… when a text post is created, a video url is created… video url =input’s value:extract with regex…
(video source in video container is video url)
searched for a proper regex that extracts a youtube videoid, nothing worked.
frustrated now. i wonder if its even possible to have a text with a link, become a video, and to have the video only appear if there is a youtube link, otherwise only have the text.
i am also planning on having links for other pages that become screenshots…now scared of even trying to figure how to do that.
I had a similar problem at one point and ended up having a dedicated Youtube URL input field - so I know that what is entered is a YouTube URL (or at least should be). Then in my video container I just set video_id to the video_url truncated from the end by 11 characters:
I guess this only helps if it is an option for you to have a dedicated URL field separate from any other text field. It would also help with your problem of knowing when to display the video container. You could just use a conditional to hide it if video_url is empty (or hide by default and display when not empty). Good luck
i wonder how twitter does it and i wonder if that is possible with bubble.
If you google “extract url from text” there appear to be many tools for this, including a blockspring block - https://open.blockspring.com/toughdan/extract-urls
this was such a good idea until i tried it, and bubble doesnt allow it.
im surprised no one else is concerned about this ability. it seems like every web app converts links to embedded video, especially youtube.
Agreed, this probably needs to be solved with a plugin and ideally a plugin for embedly or iframely.
it seems like bubble should have this ability already since there is a plugin to get the screenshot for a page, but i dont know how to use that either.
A user created that plugin, not Bubble. Most of the plugins are from users or partners like Blokspring.
the one hope i have is that there is a regex that i can use to extract the youtube url, and create a video url from that and then have the video display, but i havent found one that works or at least i havent found a way to make it work.
This topic was automatically closed after 70 days. New replies are no longer allowed.