Bug 155778
Summary: | Embedded audio does not work in SVG+SMIL animation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Emanuele Sabetta <fmuaddib> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Blocker | CC: | chchkchk236, dino, fmuaddib, jer.noble, jonlee, nicola20220, sabouhallawa, webkit-bug-importer, zimmermann |
Priority: | P1 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Emanuele Sabetta
Embedded audio does not work in SVG+SMIL animation.
If you read this article:
https://medium.com/@fmuaddib/the-following-are-the-possible-ways-to-create-professional-animations-in-svg-9d4caca5f4ec
you will find an SVG cartoon animation (the firt one).
If you start it, the audio is not reproduced.
This happens only on Safari, both on OSX and iOS versions.
On Chrome browser it works fine and the audio is reproduced correctly.
To reproduce:
1) Open this SVG animation (direct link): http://www.tbyrne.org/portfolio/smil/LoveDota.svg
Expected behavior:
- The animation should have audio reproduced
What happens instead:
- The animation have no audio
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Said Abou-Hallawa
A workaround is to move the audio data in a separate binary file instead of having it as data uri saved inside the SVG file.
Emanuele Sabetta
(In reply to comment #1)
> A workaround is to move the audio data in a separate binary file instead of
> having it as data uri saved inside the SVG file.
No, audio should be embedded in the svg file to allow the user to download the videoclip and watch it offline.
Said Abou-Hallawa
(In reply to comment #2)
> (In reply to comment #1)
> > A workaround is to move the audio data in a separate binary file instead of
> > having it as data uri saved inside the SVG file.
>
> No, audio should be embedded in the svg file to allow the user to download
> the videoclip and watch it offline.
Yes that is right. Sub-resources will not be allowed to load from a non interactive SVG. So currently there is no workaround.
Jer Noble
AVFoundation will silently fail to load data: URLs, without triggering our AVAssetResourceLoaderDelegate. We could hack around this by rewriting "data:" to "webkit-data:", handling the request in the delegate, and re-rewriting "webkit-data:" back to "data:" before passing it off to the WebCore loader.
Emanuele Sabetta
Since the original link doesn’t work anymore, here is another using github:
https://gistcdn.githack.com/Emasoft/24fc90bdc7e72fc1c61a9f87b9bc4675/raw/9aa19eb4d5557800493901c3b8cfe6336961e81f/love_dota_smil_audio.svg
Emanuele Sabetta
Here is a Codepen to easily test it:
https://codepen.io/Emasoft/pen/YzYPgbp
Radar WebKit Bug Importer
<rdar://problem/91310464>