-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OfflineAudioContext event handlers #456
Conversation
Previously this was not emitted because the OfflineAudioContext has no event loop running. By overriding the trait we do make this happen. TODO: if you call offline_context.base().set_onstatechange we run the wrong handler code stil..
It is not necessary to expose it because the BaseAudioContext methods are available on the object itself, plus it causes issues for the `set_onstatechange` handler, see b0b03a6
@@ -21,6 +21,7 @@ use crate::{node, AudioListener}; | |||
#[allow(clippy::module_name_repetitions)] | |||
pub trait BaseAudioContext { | |||
/// Returns the [`BaseAudioContext`] concrete type associated with this `AudioContext` | |||
#[doc(hidden)] // we'd rather not expose the ConcreteBaseAudioContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not pub(crate)
then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a pub trait must have all items pub. Will check later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, didn't realise it was a trait
Nice! |
Fixes #411