How to extract Youtube thumbnail from Textarea on post just like Facebook - php

have tried searching the solution to this question here but couldn't find the exact solution to my problem. what i want to do is to display the thumbnail of youtube video link posted in the textarea field of my website without having a separate input field for video urls just like its done on facebook where you post a youtube link to the same status box and it shows the thumbnail of the video.
Thanks alot

Related

Set timelines in embedded youtube video in my own website

I have embedded youtube video in my website and timelines in text format. Is there a way to make my text timelines clickable for user to jump between timelines in embedded video, similar to how it's working in youtube?
Maybe this plugin for wordpress can help you :
https://wordpress.org/plugins/skip-to-timestamp/
Otherwise you can add ?start=[nbSeconds] to the embed url like so :
https://www.youtube.com/embed/bESGLojNYSo?start=50
and modify the player url with some javascript when clicking on the timeline link

Looking to insert a clickable image in a video with php

Hi I am looking to insert a clickable image in a video. to make a video interactive.
Basically I have a form with 3 fields upload-video, upload-photo and a URL. What I am looking for is that when the user uploads these 3 fields the image will become the part of the uploaded video and upon clicking that image it will open a URL that was added in the form.
after that I have to provide the embed code of that interactive video to users.
Is there any way to achieve that functionality with php? I have looked into ffmpeg but I am not sure that it will do exactly what I need.

PHP & post Youtube ID to another page

I've been searching for this a lot but have not found exactly what I'm looking for.
So, I have a page (index.php) which displays my YouTube channel's uploaded videos as thumbnails, and either displays them inline above the thumbnails, or as links that redirect to Youtube. What I'd like to do, is to get the video's ID (which is in the a href link) and post it to another page (video.php) that shows the full embedded video (of the ID in question), with title & description. Is this possible to do?
My site is loosely based on this: http://www.yvoschaap.com/youtube.html and I've tried Youmax, but like said, they only play videos inline. I want to pass the ID of a clicked video as a parameter to the video.php page.
Sorry if this is confusing, but I'm still quite new to programming :)
You can look into Youtube Data API.
The main link you will need to retreive a list of all Videos for a channel will be somewhat like:
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults={number_of_videos_you_want}
It will recieve it's response in JSON Format containing information like your Video ID which you can pass as Parameter to your video.php page

auto upload and set featured image to wordpress post based on external url

I have a music website based on soundcloud api ,
I have custom post type called albums and each post is a track,
at the moment i can get all the details i need from soundcloud track as well as the track image url.
How can i use this url from soundcloud and make wordpress download that image and set it as the post featured image?
I have tried and searched over the net and couldn't find nothing on how auto upload and publish external featured image.
Any help would be perfect!
Cheers!
Try this extension for WordPress:
http://wordpress.org/plugins/wp-remote-thumbnail/
http://magnigenie.com/wp-remote-thumbnail-set-external-images-featured-image/

Create a video preview from link paste

Is there a script that simulates facebook's video post? where you can paste the link in your post, and it will automatically bring up a preview and description of the video? Or is this simple enough to do without a script? How would I go about this?
When you paste the link you will need to parse the link to retrieve the video ID.
Once you have the ID you can get the video information from the Facebook Graph.
This should give you an example of the data available: https://developers.facebook.com/tools/explorer/?method=GET&path=me%3Ffields%3Dvideos

Categories