Automattic / Automattic/jetpack
VideoPress: Transform wpvideo shortcodes to video blocks
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
It would be great if the VideoPress extension could define a new [transform](https://github.com/Automattic/wp-calypso/blob/d1eda6780c88bbb68c00bcd2643253e417beed7e/client/gutenberg/extensions/videopress/editor.js#L67) for the [wpvideo shortcode](https://en.support.wordpress.com/videopress/).
That way, when opening an old post containing `[wpvideo]` shortcodes (or when pasting them in a new post), they are converted automatically to VideoPress-enhanced video blocks like we do with the [related posts](https://github.com/Automattic/wp-calypso/blob/d1eda6780c88bbb68c00bcd2643253e417beed7e/client/gutenberg/extensions/related-posts/index.js#L65-L68) or [simple payments](https://github.com/Automattic/wp-calypso/blob/d1eda6780c88bbb68c00bcd2643253e417beed7e/client/gutenberg/extensions/simple-payments/index.js#L92-L110) shortcodes.
Only the hd, autoplay and loop shortcode options can be supported by the VideoPress extension so we can probably ignore the rest of them (width, height, freedom).
Contributor guide
Research direction
Start with client/gutenberg/extensions/videopress/editor.js and compare the shortcode transforms in related-posts/index.js and simple-payments/index.js. Implement the wpvideo transform for old and pasted shortcodes, preserving only hd, autoplay, and loop, then verify that it produces VideoPress-enhanced video blocks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100