Thumb to WP Featured


#1

Can the thumbnail for videos be set to wordpress featured image per media instead of rt_media_featured?


#2

Hello @rickmcgroovy,

We are not very clear about your requirement. Can you please give some more detail?

Thank you.


#3

It seems like rtmedia is struggling to display the thumbs when I upload the videos. So I’m guessing its because rtmedia isn’t generating them. I installed an additional plugin that generates thumbs for all the videos upload on the website and attaches it to the media page. So I’m thinking all I need is to link the thumbnail attached to the media page to rtmedia. Can rtmedia call wp featured image instead of the image rtmedia generated instead


#4

Hello @rickmcgroovy,

You will need to do some custom coding for this one.

When you get the thumbnail URL from your additional plugin, you can simply use it to update our database table wp_rt_rtm_media which contains one field named cover_art that holds thumbnail image URL. We are assuming you are having hook of that plugin after thumbnail is generated.

Below is the sample code which will help you to update the cover_art.

$model = new RTMediaModel();
$thumb_url = 'Thumb url here'; // Thumb URL from your additional plugin.
$post_id = 'post id here'; // Post id of the attached video.
$model->update( array( 'cover_art' => $thumb_url ), array( 'media_id' => $post_id ) );

Thank you.


#5

This is the codes that gets displayed onLoad:

< video src=“http://www.gloveo.com/wp-content/uploads/rtMedia/users/1/IMG_40091.mp4” id=“rt_media_video_779” controls=“controls” height=“240” width=“305”>plugins/buddypress-media/app/main/controllers/activity/RTMediaBuddyPressActivity.php< /video>

no $poster nor $cover_art gets detected. Which is why I’m attempting to use another plugin to generate thumbs for the media uploaded. I will play around with your given codes and see if I conclude to anything.

it seems that rtmedia_get_cover_art_src( $media->id ) isnt resulting to anything


#6

I added this code:

			$cover_art = get_the_post_thumbnail( $media->media_id );

but instead of rendering the url link, it outputs the whole < img /> tag with the proper url . what would the appropriate function be to only output the the url?


#7

or maybe allow the whole img tag displayed on top of the video tag that way facebook can pick up a thumbnail?


#8