Automattic / Automattic/blocks-engine

Preserve native video playback attributes during HTML conversion

Open
#864 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## Problem

HTML-to-block conversion preserves a video source, poster, dimensions, preload, and controls, but drops native playback attributes such as `autoplay`, `loop`, `muted`, and `playsinline`. An autoplaying background video therefore imports as a paused `core/video` block even though the media asset is correctly localized.

## Reproduction

Convert:

```html

```

The resulting `core/video` block retains `src` but omits the playback attributes from both block attributes and canonical save markup.

## Expected

Preserve supported native `core/video` attributes and emit save-compatible markup so frontend playback semantics match the source without custom JavaScript. Add generic parity coverage for child `` conversion.

## AI assistance

OpenAI GPT-5.6 Sol via OpenCode diagnosed the conversion boundary and drafted this issue. Chris Huber reviewed and directed the work.

Contributor guide

Open the contributing guide

Research direction

Start at the HTML-to-block conversion boundary for the core/video block and reproduce the provided video input. Trace how native playback attributes and child source elements become block attributes, then verify that autoplay, loop, muted, and playsinline appear in canonical save markup with generic child-source parity coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.