[Webkit-unassigned] [Bug 212117] New: Audio is not allowed to start in touchend/mouseup events if dragged on iOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 19 18:01:40 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=212117

            Bug ID: 212117
           Summary: Audio is not allowed to start in touchend/mouseup
                    events if dragged on iOS
           Product: WebKit
           Version: Safari 13
          Hardware: iPhone / iPad
                OS: iOS 13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jonathan at tumult.com

Created attachment 399795

  --> https://bugs.webkit.org/attachment.cgi?id=399795&action=review

Reproduction case (html + mp3)

Audio is typically allowed to play from user events like a touchend or mouseup. However, if the touchend is preceded with a finger movement (like a drag/swipe), then it will not allow the audio to playback.  This is illustrated in this simple code:

```
<audio id="myaudio" src = "suspiro.mp3" controls></audio><br><br>

<div id = "touchmebox" style = "width: 600px; height: 200px; background-color: #ccc">drag then touchend</div>

<script>

touchmebox.addEventListener("touchend", function () { // or "mouseup"
        myaudio.play();
        console.log("" + window.event.type);
});

</script>
```

(repro case with audio attached)

If you just "tap" the touchmebox  target, the audio will play. If you drag on the target (still ending on the touchmebox), audio will not be allowed to play.
The event is definitely being fired evident from the console log. And of course, once there is an initial successful playback of the audio on the page, it unlocks it to work.

This only occurs on iOS. Audio is allowed to playback in this manner on Desktop Safari (via mouseup, since there is no touchend).

This affects documents made with Tumult Hype [https://tumult.com/hype/] since swiping actions use mouseup/touchend.

-- 
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/20200520/10f3d376/attachment.htm>


More information about the webkit-unassigned mailing list