[Webkit-unassigned] [Bug 228971] New: decodeAudioData should support .mov files recorded by iPhone
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 10 14:36:46 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=228971
Bug ID: 228971
Summary: decodeAudioData should support .mov files recorded by
iPhone
Product: WebKit
Version: Safari 14
Hardware: iPhone / iPad
OS: iOS 14
Status: NEW
Severity: Normal
Priority: P2
Component: Web Audio
Assignee: webkit-unassigned at lists.webkit.org
Reporter: rallsopp06 at gmail.com
CC: cdumez at apple.com
In Safari for iOS, the decodeAudioData method of the WebAudio api is unable to extract an audio buffer from .mov videos recorded with iPhone, despite the fact that the <video ...> element can play these videos and their audio correctly.
Running the following example from Safari in an iPhone X, the 'it failed... err:' alert is always shown when attempting to load a .mov file recorded with the phone:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>decodeAudioData test</title>]
</head>
<body>
<input type="file" accept="video/*" id="video-test-input">
<script>
const fileSelector = document.getElementById('video-test-input')
fileSelector.addEventListener('change', e => {
const [file] = e.target.files
const reader = new FileReader()
reader.addEventListener('load', () => {
new AudioContext({sampleRate: 44100})
.decodeAudioData(reader.result, function(buffer) {
alert('it worked! duration: ' + buffer.duration)
}, function (err) {
alert('it failed... err: ' + err)
})
})
reader.addEventListener('error', () => alert('file read failed... err: ' + reader.error))
reader.readAsArrayBuffer(file)
})
</script>
</body>
</html>
mp4 videos work fine with this example, but it limits the utility of this feature a lot when the videos natively recorded by the device can't be used.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210810/a9398c77/attachment.htm>
More information about the webkit-unassigned
mailing list