Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-7521

Migrate Media Block to Audio/Video blocks

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Should have Should have
    • None
    • None
    • 2
    • Block: Media
    • Sprint #242, Sprint #243
    • 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).

      Links

        1. control-page.png
          control-page.png
          3.77 MB
        2. exp.png
          exp.png
          1.95 MB

            pfiguero Pedro Figueroa
            tkaus Taylor Kaus
            Taylor Kaus Taylor Kaus
            Sagar Deshmukh Sagar Deshmukh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: