ampproject / ampproject/amphtml

Support blob URLs in <amp-video>

Open
#27,557 5 comments 0 reactions 1 assignee Claimed by @alanorozco View on GitHub
Component: amp-video & interface P3: When Possible Stale Type: Feature Request WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## What's the issue?

I develop CMS with AMP support, it has a feature of amp story preview before publishing it to the server.

User selects local video and it's converted to object url using `URL.createObjectURL()` to be able to preview the result before uploading video to the server. The resulting url is in the following format: `blob:https:///7f6f6c53-6b4b-4282-bcac-bbc67e543d88`.

Then the object url is used as a source of `amp-video` which works but throws errors in console:
`Uncaught Error: amp-video source must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: blob:https:///7f6f6c53-6b4b-4282-bcac-bbc67e543d88​​​`.

The same error if object url is used for amp-video.poster.

## What browsers are affected?

All browsers

## Which AMP version is affected?

2004030010070

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.