This makes the `handleEvents` function capture the reference and be able to check the updated state, unblocking the media sending flow
This makes the `handleEvents` function capture the reference and be able to check the updated state, unblocking the media sending flow