Capture pictures and videos?

Ok I know its possible, I just need a little help.

I found this:

function custom_rtmedia_camera_build($type) {
    if ( $type == 'photo' ) {
        global $rtmedia_media;
        $id = $rtmedia_media->id;
        $camera = get_rtmedia_meta($id,'camera');
        echo '<br /><br /><label for="camera">Camera</label>  ';
        echo '<input class="camera" id="camera" type="text" name="camera" value="'.$camera.'" />';
    }
}

add_action('rtmedia_add_edit_fields', 'custom_rtmedia_camera_build');

and this:

function custom_save_rtmedia_camera_build($id, $state) {
    $type = rtmedia_type($id);
    if ( $type == 'photo' ) {
        $camera = get_rtmedia_meta($id,'camera');
        if ( $camera != $_POST['camera'])
        update_rtmedia_meta($id,'camera',$_POST['camera']);
    }
}

add_action('rtmedia_after_update_media', 'custom_save_rtmedia_camera_build', 10,2);

Where do I add these codes? This is a must have feature for me.

Thanks.

All of that would go in your themes functions.php file.

/wp-content/themes/YOUR-THEME-DIRECTORY/functions.php

thank you, i will try it now and see if it works.

How do I add the capture button? It still shows the standard upload form.

Hi @kavan_lyles,

Can you please explain why do you want to add capture button and what is the purpose of this button ?