You can inspire from this tutorial here:
http://www.sitepoint.com/adding-a-media-button-to-the-content-editor/
For videos you can change the library type to ‘video’:
function open_media_window() {
var window = wp.media({
title: 'Insert a media',
library: {type: 'video'},
multiple: false,
button: {text: 'Insert'}
});
}
Hope this helps.
Related Posts:
- WordPress 3.5 Media Manager – add a button
- Hook for image edit popup
- How to extend Media Library (WP 4.4)
- Upload images from custom plugin using the media modal
- WordPress 3.5 Media Manager – add a button
- Media upload not working on theme option in WordPress 3.8.1
- adding a button to the media uploader
- What WordPress API function lists active/inactive plugins?
- What plugin can I use to create a list / slideshow of featured images?
- Change Page’s Tag Using functions.php File
- Upload specific images to specific folder
- Any plugin out there that uses WP’s internal image uploader?
- Get Latest Plugin Version from WP API
- How to make WordPress use protocol indepentent upload files?
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- How do I retrieve a list of popular plugins using the WordPress.org Plugin API?
- How to create an edit media button for slideshow plugin?
- Using the media uploader in a custom plugin
- Using custom code, how can I fetch data from the WordPress plugin repo?
- Can’t use /wp-json/wp/v2/plugins API endpoint even as administrator
- Multisite functions to communicate with individual site functions
- Does the WordPress API have Modal Dialogs
- Generated Images sizes do not match Media Settings Image Size
- What is the best way to move a plugin´s subdirectory+files to wp-content/uploads-directory?
- Create or Update thousands of woocommerce products via PHP
- Looking for a solution – slightly convoluted problem
- How to import 55k images (uploaded via FTP) into WordPress Media libary? [closed]
- How can I serve a text file at a custom URL
- How to export a list of all media urls? [closed]
- How can I add an options page for my class based plugin?
- Sending WP posts to external API
- add mediaelement.js plugins into WordPress video player control bar
- CMB2 Repeatable Group & JSON API
- Restrict media upload size by format
- How to use JSON data from URL into table on my wordpress website
- wp_remote_get() returns 403 while file_get_contents() does not
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- How to disable search as you type plugin suggestions?
- Set plugin-values when creating post via REST-API
- Retrieving Meta from Image Attachment
- media page returnig to 404 in rtmedia [closed]
- Fullscreen Video/GIF Intro
- WordPress stats API key
- Plugin is a widget, but I want to call it in the head, can I?
- Socialite WP plugin, unable to obtain API keys from FB
- How to pass the API key to the client from the database? [closed]
- AJAX on Front-End Button Click not working – Custom Plugin
- Getting a Page via its post-name using WP REST API v2 and Postman
- How to set category correctly for a custom post created by a remote API call?
- Integrating boxtal PHP library into a custom WordPress Plugin
- Custom API plugin to execute 3rd party API to retrieve data
- How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
- Sending customer an email with link to stripe to make payment
- Delete Media not attached with Any posts
- How to get a list of all the available plugins names
- Convert to shortcode?
- Disable submit button order
- Generate Own Custom CSS Button with icon
- Including content from legacy app: via plugin or custom content?
- Why may one avoid Jetpack plugin? [closed]
- How do I display PHP file contents on front end of WordPress?
- Bulk Image Resize for Media Library, but for ENLARGING instead of Shrinking
- Upload PlugIn Button is missing
- Which post/page an image is attached to
- Do i need to use a plugin for third party api integration?
- WordPress output data to another website and pull data
- How to get data from a private API and add it to wordpress pages
- Create API for registering user on wordpress site with 3rd party site
- Different function call depending on shortcode?
- How to execute certain code on back-end button press?
- Add Cancel Button to a Custom Meta Box
- How to find out programmatically whether any cache plugin is installed in the WordPress website?
- Custom Gallery plugin uploading to different dir, and post to page
- WordPress Media Uploader : How to add custom button on featured image tab
- In the WordPress API is there a way to set the width of the post/page container
- “Listen” button on my main post page
- Where to store media uploaded by the plugin?
- WordPress, modular content, and syndication
- How to Insert images in WordPress using code
- Add Flatr button to Sharing option
- create web service for android app using wordpress website
- API Functions to Register and Show WordPress List Tables
- WordPress Settings – Custom Button actions
- Integrating a hosted app with wordpress using the API
- How do I secure a subdomain using UCC SSL?
- Plugin that uses AngularJS tutorial
- Change text “My Basket” in woocommerce artificer theme
- Import tumblr post to wordpress blog
- Get value of a key from a Plugin Serialized array
- How to import data from another website using an API link?
- add_image_size is not generatin images of correct dimensions
- How can I send api calls from my plugin?
- Am having issues intergrating this api into my wordpress site, any help please?
- cURL External API request displays content above other content on page
- How to put tags on photos in Windows that WordPress can read and apply on media files?
- How to write a plugin that “listens” every time, an edit occurs?
- Upload the images folder with sub-folders directly to server
- Is it possible to create post in wordpress using postman?
- move setting data from wordpress api to codestar freamwork
- How To Convert External Image URLs To Own Website’s Uploaded Images Automatically?