-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Input Youtube/Vimeo Field #130
Conversation
I had a look around for the video detector library, I found a few that were overly bloated or didnt work with the latest youtube api, so I opted for a simple bespoke one usage database column type should be either json or text ``` protected $casts = [‘video’ => ‘array’]; $this->crud->addField([ 'label' => ‘YouTube / Vimeo video’, 'type' => 'video', 'name' => ‘video’ ]); $this->crud->setColumnDetails(‘video’, ['type' => 'video']); ``` this will return an object similar to $video = { id: 234324, title: ‘my video title’, image: ‘https://provider.com/image.jpg', url: ‘http://provider.com/video', provider: ‘youtube’ }
Awesome! Will check and merge this weekend. Great job! |
Tested, it works for both normal URLs and "share this" URLs, which is great. Two mentions though:
Cheers! |
@tabacitu just pushed the above 2 changes, give them a look when you can :) |
@tabacitu have updated incase you want to check it out |
Hi @OwenMelbz , I think it looks and works great. It's one-line, we can use it with col-md-4 or col-md-6, looks simple and is intuitive. Great work. Also, tried the column - looks and works great. No comments there. Pushed an update to make them both work with and without attribute casting. ...sorry to come back to you with this. But I got this bug that... well, it keeps bugging me :-) It seems to me like the video name shows up for a split second on screen when hovering the screenshot. Might only be happening on Youtube. I used this link: Could you take a look when you have the time, maybe you figure it out? Cheers! |
@tabacitu ha wow that's a funky bug! Wonder how I missed that lol! I'll have to check it next week as away with family this weekend with only my phone! |
Sure, no rush :-) Enjoy family time. I'll keep replying to your emails and issues though - please ignore them until you're back. |
Oh the fun is over already haha! Been back at work last 2 days, so back in full swing, will give this a look over tonight hopefuly |
@tabacitu i cant actually replicate this, but are you able to pull the branch and see if its still happening please? thanks |
Yup, it's now fixed, thank you. Merging! |
summary
Enables users to save youtube or vimeo videos to fields with useful basic meta data attached
preview

usage
database column type should be either json or text
this will return an object similar to