We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3eb5c8 commit 6179ea2Copy full SHA for 6179ea2
src/host/webaudio/mod.rs
@@ -374,15 +374,18 @@ impl DeviceTrait for Device {
374
.expect(
375
"Unable to connect the web audio buffer source to the context destination",
376
);
377
- source.set_onended(Some(
378
- on_ended_closure_handle
379
- .read()
380
- .unwrap()
381
- .as_ref()
382
383
384
- .unchecked_ref(),
385
- ));
+ source
+ .add_event_listener_with_callback(
+ "ended",
+ on_ended_closure_handle
+ .read()
+ .unwrap()
+ .as_ref()
386
+ .unchecked_ref(),
387
+ )
388
+ .expect("Failed to add ended event listener");
389
390
source
391
.start_with_when(time_at_start_of_buffer)
0 commit comments