Hi Dinesh,
Many thanks for taking a look. es, we require those fields to be able to create a single video view pulling in the id number from the transcoder.
Jamal (former Toolset Support) kindly wrote me a code snippet to do just that (see below) and details can be found in this previous support thread - https://toolset.com/forums/topic/updating-transcoded-video-filenpath-reference/
function converted_media_player_func( $atts ) {
global $post;
$id = media_info_func( array() );
return do_shortcode( '[rt_media attachment_id="' . $id . '"]' );
return $results;
}
add_shortcode( 'converted-media-player', 'converted_media_player_func' );
function media_info_func( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'field' => 'wpcf-video-upload',
),
$atts
);
global $post, $wpdb;
$field = $atts['field'];
$info = $atts['info'];
$media_url = get_post_meta( $post->ID, $field );
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $media_url ));
$attachment_id = $attachment[0];
return $attachment_id;
}
add_shortcode( 'types-media-id', 'media_info_func' );
function converted_media_url_func( $atts ) {
global $post;
$id = media_info_func( array() );
$path = do_shortcode( '[wpv-post-field name="_rt_media_transcoded_files" item="' . $id . '"]' );
$rul = WP_CONTENT_URL . '/uploads/' . $path;
return $rul;
$results = '<video class="single-video" controls="" autoplay="">';
$reulsts .= '<source src="' . $rul . '">';
$reulsts .= '</video>';
return $results;
}
add_shortcode( 'converted-media-url', 'converted_media_url_func' );
What I cant understand is how the fields are showing in the hidden fields search on the previous site and aren't on this site, when it's the same plugin, same version, etc.
I can give you a login to the child site if thats helpful.
Kind regards
James