pytest-dev / pytest-dev/pytest-html

HTML source type for video is hardcoded as video/mp4

Open
#819 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

The HTML source type for videos is currently hardcoded as "video/mp4" in the jinja2 template. This seems to prevent Safari from playing webm video files, although Chrome and Firefox seem to handle this fine.
(NOTE: I use --self-contained-html option)

I've modified it to "video/webm" in the generated report and confirmed that Safari can play webm videos.

Please change the template to reflect the mime_type value given to extras.video().

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/pytest_html/resources/index.jinja2 and the mime_type argument in src/pytest_html/extras.py. Trace how extras.video() data reaches the template, then run the relevant pytest-html tests. Done means the generated video source uses the supplied MIME type, including video/webm for self-contained reports.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.