rhea
August 23, 2022, 12:36pm
1
Anyone know why a link like:
Mayonnaise - Ipagpatawad Mo (Karaoke/Acoustic Instrumental) - YouTube
will work with Bubble’s video player but not with a time parameter like:
Mayonnaise - Ipagpatawad Mo (Karaoke/Acoustic Instrumental) - YouTube
?
Also, the video player doesn’t work with links generated from Youtube’s share button, like this: https://youtu.be/EHoZ-LofjkI
Hi @rhea
Bubble video element expects video ID which is v=EHOz-Lofgjh
It won’t recognise id from the url by default (you have to extract id using regular expression)
You can read more about video element here
https://manual.bubble.io/core-resources/elements/visual-elements#video
rhea
August 23, 2022, 1:09pm
3
I was asking this because I wanted to supply the time parameter programmatically.
@rhea I think for that you need to use video player plugin
stuart4
October 27, 2022, 10:41pm
6
I know this is a little old but here are two links to other members who had similar issues with regex and getting the correct data out:
This regEx pattern I find is the best. Extract with Regex empty - #11 by sudsy
This is useful if you want to get the image also:
Leaving this for others who might need it (as did I). Extracting the YouTube ID has many benefits, including easier access to the YouTube API functions as well as pulling the default poster image for the video.
To achieve this simply use “:Extract with Regex” and use the following expression:
(?<=watch?v=|/videos/|embed/|youtu.be/|/v/|watch?v%3D|%2Fvideos%2F|embed%2F|youtu.be%2F|%2Fv%2F)[^#&?\n]*
To get YouTube’s poster image (the image that is shown before playback). Just use this path: http…
What I did was this:
I have a standard Youtube element and pull in the a custom field from the database:
When saving the input to the database I use regex on this to extract and only save the youtube ID:
(?<=v=|v/|embed/|be/)([^&?]+)
I also show an alert if the input is invalid using the same regex but looks to see if the regex didn’t return anything - which i determine is invalid, but you may have your own ideas here.
2 Likes
system
Closed
November 1, 2022, 12:36pm
7
This topic was automatically closed after 70 days. New replies are no longer allowed.