Bug 243912
| Summary: | Certain TikTok sound previews are broken | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Youssef Soliman <y_soliman> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | jer.noble, saaa122e, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Youssef Soliman
Any TikTok sound generated from an originally uploaded video (not submitted as a separate audio) is not handled properly by our media pipeline.
The issue arises from TikTok making a request for an `audio/mpeg`, while the server responds back with a MIME type of `video/mp4` and response body containing an `mp3` file.
Downloading the file locally, you can see that renaming the file extension to `mp3` and opening it in Safari will play normally.
A fix for this might involve inferring the type separately and falling back to that media type if the initial load is unsuccessful.
Example of broken audio
Link to sound: https://www.tiktok.com/music/original-sound-7089077221968595755
Direct audio file link: https://v16m.tiktokcdn.com/9b85c36eb6ee5af4270d709d3bc99129/62f7515f/video/tos/maliva/tos-maliva-v-27dcd7c799-us/662ea36d360b41539e8b0fc113ebefc7/
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/98596397>
Jer Noble
Modifying the source of that page so that the <video> element has a <source> tag with a 'type="audio/mpeg"' attribute causes the page to load correctly.
<video class="" playsinline="true" x5-playsinline="true" webkit-playsinline="true" tabindex="2" mediatype="video">
<source src="https://v16m.tiktokcdn.com/9d1d39b4d82b9f45898221476afe4b7e/62f844a7/video/tos/maliva/tos-maliva-v-27dcd7c799-us/662ea36d360b41539e8b0fc113ebefc7/?a=1233&ch=0&cr=0&dr=0&er=3&cd=0%7C0%7C0%7C0&br=250&bt=125&ft=ApCEgBnZqq2mo0PZ9YyfkVQZ2TJw_KJ&mime_type=audio_mpeg&qs=6&rc=NDY2ZzZoZDQ8M2RnZDdkNUBpM2c0O2c6ZmpxPDMzZzU8NEAtLmM1YjMvNTYxYS0vL2M0YSNeLl5ncjRfYGRgLS1kMS9zcw%3D%3D&l=202208131840460101921662191132E5D9&btag=80000&cc=3" type="audio/mpeg">
</video>
Jer Noble
May want to consider suggesting that workaround to TikTok.