<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>228971</bug_id>
          
          <creation_ts>2021-08-10 14:36:46 -0700</creation_ts>
          <short_desc>decodeAudioData should support .mov files recorded by iPhone</short_desc>
          <delta_ts>2021-08-17 14:37:26 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Audio</component>
          <version>Safari 14</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rob">rallsopp06</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>jer.noble</cc>
    
    <cc>rallsopp06</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1783300</commentid>
    <comment_count>0</comment_count>
    <who name="Rob">rallsopp06</who>
    <bug_when>2021-08-10 14:36:46 -0700</bug_when>
    <thetext>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 &lt;video ...&gt; element can play these videos and their audio correctly.

Running the following example from Safari in an iPhone X, the &apos;it failed... err:&apos; alert is always shown when attempting to load a .mov file recorded with the phone:

&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
	&lt;meta charset=&quot;UTF-8&quot;&gt;
	&lt;title&gt;decodeAudioData test&lt;/title&gt;]
&lt;/head&gt;
&lt;body&gt;
&lt;input type=&quot;file&quot; accept=&quot;video/*&quot; id=&quot;video-test-input&quot;&gt;
&lt;script&gt;
	const fileSelector = document.getElementById(&apos;video-test-input&apos;)
	fileSelector.addEventListener(&apos;change&apos;, e =&gt; {
		const [file] = e.target.files

		const reader = new FileReader()

		reader.addEventListener(&apos;load&apos;, () =&gt; {
			new AudioContext({sampleRate: 44100})
					.decodeAudioData(reader.result, function(buffer) {
						alert(&apos;it worked! duration: &apos; + buffer.duration)
					}, function (err) {
						alert(&apos;it failed... err: &apos; + err)
					})
		})

		reader.addEventListener(&apos;error&apos;, () =&gt; alert(&apos;file read failed... err: &apos; + reader.error))

		reader.readAsArrayBuffer(file)
	})
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

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&apos;t be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1784934</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-08-17 14:37:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/82047240&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>