Bug 203382 - Audio Track ends when disabled
Summary: Audio Track ends when disabled
Status: RESOLVED DUPLICATE of bug 202405
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-24 13:31 PDT by makarand
Modified: 2020-01-06 17:50 PST (History)
5 users (show)

See Also:


Attachments
this html helps repro the issue (3.24 KB, text/html)
2019-10-24 13:31 PDT, makarand
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description makarand 2019-10-24 13:31:27 PDT
Created attachment 381840 [details]
this html helps repro the issue

On Safari on iOS 13: 

Step 1: Call getUserMedia({audio: true}) to obtain a media stream with audio track
Step 2: Attach the stream to audio element
Step 3: disable the audio track by calling audioTrack.enabled = false
Step 4: Switch to another app for few seconds. 

Step 5: 
Observe: Notice that Audio Track goes into readyState=ended. And it can not be played anymore.
Expected: The audio track be able to be played once enabled.


Once we get into this situation, Now notice that even w/o switching to another app, audio track immediately ends when disabled.

Step 6: Call getUserMedia({audio: true}) to obtain a media stream with audio track
Step 7: Attach the stream to audio element
Step 8: disable the audio track by calling audioTrack.enabled = false

Step 9: 
Observer: track goes into readyState=ended state.
Expected: track should just go into disabled state, and not end.

Following jsfiddle makes it easy to see the repro in action:

https://jsfiddle.net/makarandp/3c29y40q/
Comment 1 Radar WebKit Bug Importer 2019-10-24 15:09:51 PDT
<rdar://problem/56596348>
Comment 2 Francesco Durighetto (kekkokk) 2019-11-08 09:30:57 PST
Duplicated of:
https://bugs.webkit.org/show_bug.cgi?id=202405

this has been fixed in the new iOS 13.2.2 release
Comment 3 Eric Carlson 2019-11-08 09:43:32 PST
Thanks for the comment Francesco.

*** This bug has been marked as a duplicate of bug 202405 ***
Comment 4 Manjesh Malavalli 2020-01-06 17:50:28 PST
Hi Youenn,

I think this bug is still present in i0S 13.3. I ran the JSFiddle and was able to reproduce the observed behavior. The fix was supposed to be released in 13.2.2. Can you please clarify?

- Manjesh