-
Task
-
Resolution: Merged
-
Should have
-
2
-
Block: Media
-
Sprint #242, Sprint #243, Sprint #244
-
tavros
Summary
Phase out the P4 Custom Media block and replace it with the Wordpress native Audio/Video blocks. The only additional feature that our block offers is the option to set a poster image for videos.
Requirements
- Enable Audio and Video Gutenberg blocks on all post types.
- Check if the media_url is a valid url:
- If not, then assume it's a Youtube video id and use the Embed block.
- If it's a url, check if it has an extension or not:
- If not, use the embed block as it's from a media service (eg. Youtube, Vimeo, Soundcloud, etc.)
- It it has an extension, conditionally use Audio or Video block based on the files extension (eg. mp3, wav, ogg: audio, mp4: video).