automattic/jetpack-videopress

VideoPress package

Installs: 606

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Type:jetpack-library

v0.4.1 2022-09-27 17:31 UTC

This package is auto-updated.

Last update: 2022-09-27 22:47:58 UTC


README

VideoPress package

How to consume VideoPress package

Install the right packages

First, let's make sure that the automattic/jetpack-videopress package is set up in your composer.json file:

At minimum you need three things. One is the automattic/jetpack-autoloader package, which will ensure that you're not colliding with any other plugins on the site that may be including the same packages. Two, of course, is the automattic/jetpack-videopress package. Third is our automattic/jetpack-config package that will be your tool for initializing the packages.

Initialize the package

Second, we must initialize ("configure") the jetpack-videopress package within your plugin, and provide the information about it.

This is where the jetpack-config and jetpack-autoload packages come into play. Do this, and you're ready to start consuming the Jetpack connection!

use Automattic\Jetpack\Config;

require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';

function jpcs_load_plugin() {

	// Here we enable the Jetpack packages.
	$config = new Config();
	$config->ensure( 'videopress' );
}

add_action( 'plugins_loaded', 'jpcs_load_plugin', 1 );

Initialization Options

When initializing VideoPress, you can choose whether you want to initialize the Admin UI or not. By default, the admin UI is not initialized. If you want it, just add the admin_ui key in your options when ensuring the feature:

$config = new Config();
$config->ensure(
	'videopress',
	array( 'admin_ui' => true )
);

Development

Build all bundles

jetpack build packages/videopress

Build in watching dog mode 🐕

jetpack watch packages/videopress

Get Help

Security

Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.

License

videopress is licensed under GNU General Public License v2 (or later)