Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes HTML encoding in sample #187

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/api/01-basics/02-multiple-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ one to play.

```html
<video>
<source src="av1.mp4" type="video/mp4; codecs=\"av01.0.04M.08\"">
<source src="hevc.mp4" type="video/mp4; codecs=\"hvc1\"">
<source src="vp9.mp4" type="video/webm; codecs=\"vp9\"">
<source src="av1.mp4" type="video/mp4" codecs="av01.0.04M.08">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaulKinlan I don't believe codecs is a valid <source> attribute. In this context, codecs is a part of the MIME value and should be delimited by ; from the MIME type.

But you are onto something here. Escaping using \ is not allowed either, AFAIK. We should probably use single quotes around the type attribute value and keep " unescaped.

Like this:

<source src="av1.mp4" type='video/mp4; codecs="av01.0.04M.08"'>
<source src="hevc.mp4" type='video/mp4; codecs="hvc1"'>
<source src="vp9.mp4" type='video/webm; codecs="vp9"'>

<source src="hevc.mp4" type="video/mp4" codecs="hvc1">
<source src="vp9.mp4" type="video/webm" codecs="vp9">
<source src="h264.mp4" type="video/mp4">
</video>
```
Expand Down