I’ve done it, it’s really easy to do. I have my own “slideshow” shortcode in post.php which almost exactly behaves like “gallery” shortcode. Here is a very simplified version of what you need to do.
First you need to call a function which will include all the media for you(but since we are in posts, it’s already been done). Either way, it’s
wp_enqueue_media();
Then create the media frame.
var function_which_handles_update = function (selection) {
//do stuff with selection, look at wp.media.gallery and others for examples
}
var frame = wp.media({
id: 'my-frame',
frame: 'post',
state: 'insert',
editing: true,
multiple: false
});
frame.on( 'update', 'function_which_handles_update');
//other "ons" exist such as: open, close, select...etc
something.onclick = frame.open(); //pseudo
Tutorials:
https://github.com/thomasgriffin/New-Media-Image-Uploader
https://shibashake.com/wordpress-theme/how-to-add-the-wordpress-3-5-media-manager-interface
https://shibashake.com/wordpress-theme/how-to-add-the-wordpress-3-5-media-manager-interface-part-2