Bug 236967

Summary: Unexpected stop playing an audio track on a website
Product: WebKit Reporter: Nick <hiatal-tab-0t>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric.carlson, jer.noble, smoley, supersonicandtails, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 12   
Attachments:
Description Flags
Test case none

Description Nick 2022-02-21 04:22:14 PST
If start play Audio on any website using JavaScript, for example:

    let el = document.querySelector(".player-controls__btn_play");
    var evObj = document.createEvent('Events');
    evObj.initEvent("click", true, false);
    el.dispatchEvent(evObj);

or

    document.querySelector(".player-controls__btn_play").click();


or using websites API


    externalAPI.togglePause();


playback stops after 20-80 seconds (media tab must be inactive).
Comment 1 Radar WebKit Bug Importer 2022-02-23 15:40:44 PST
<rdar://problem/89382571>
Comment 2 Smoley 2022-03-09 09:34:19 PST
Thanks for filing, can you please link a reduced test case here?
Comment 3 Nick 2022-03-09 10:23:36 PST
Created attachment 454262 [details]
Test case