NEW 155778
Embedded audio does not work in SVG+SMIL animation
https://bugs.webkit.org/show_bug.cgi?id=155778
Summary Embedded audio does not work in SVG+SMIL animation
Emanuele Sabetta
Reported 2016-03-22 17:01:10 PDT
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
Said Abou-Hallawa
Comment 1 2016-04-12 15:46:39 PDT
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
Comment 2 2016-04-12 15:51:49 PDT
(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
Comment 3 2016-04-12 16:34:23 PDT
(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
Comment 4 2016-04-13 09:17:33 PDT
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
Comment 5 2022-03-14 15:51:24 PDT
Emanuele Sabetta
Comment 6 2022-03-14 18:17:08 PDT
Here is a Codepen to easily test it: https://codepen.io/Emasoft/pen/YzYPgbp
Radar WebKit Bug Importer
Comment 7 2022-04-05 12:51:04 PDT
Note You need to log in before you can comment on or make changes to this bug.