-
Notifications
You must be signed in to change notification settings - Fork 192
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
watchAdvertisements() should return a "sentinel" object #591
Comments
Any news on this topic? After calling |
Thanks for pointing out the problem with the We're tracking this on the implementation side as Chromium issue 1345995 which is blocking marking |
Thanks for referencing the issue @reillyeon ! So, is there currently any way to scan continuously or in regular intervals with this API at all? I didn't received any scan results using |
Scan frequency will always be limited by what the underlying platform allows but the idea of providing a sentinel object is to make that visible to the application so that it can restart the scan session after an interval. |
The
requestLeScan()
object returns a "sentinel" object that allows the developer to observe the status of the scan operation and stop it. This is important because some platform Bluetooth stacks enforce a limitation on how long a scanning session can be active and so it is important for a site to know whether to expect to receive moreadvertisementreceived
events or not so it can keep its UI up to date.Right now
watchAdvertisements()
just takes anAbortSignal
which can be used to stop the scan but this was based on a pattern copied from the Screen Wake Lock API which we eventually decided against, instead adding theWakeLockSentinel
interface. We should make this change to the Web Bluetooth API as well.Right now
BluetoothLEScan
doesn't provide an event when the scanning session is stopped (only an attribute) but it could be updated to fire astop
event or something similar.The text was updated successfully, but these errors were encountered: