Package org.mozilla.geckoview
Interface GeckoSession.PermissionDelegate.MediaCallback
- Enclosing interface:
- GeckoSession.PermissionDelegate
public static interface GeckoSession.PermissionDelegate.MediaCallback
Callback interface for notifying the result of a media permission request, including which
media source(s) to use.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Called by the implementation after permissions are granted; the implementation must call one of grant() or reject() for every request.default void
grant
(GeckoSession.PermissionDelegate.MediaSource video, GeckoSession.PermissionDelegate.MediaSource audio) Called by the implementation after permissions are granted; the implementation must call one of grant() or reject() for every request.default void
reject()
Called by the implementation when permissions are not granted; the implementation must call one of grant() or reject() for every request.
-
Method Details
-
grant
Called by the implementation after permissions are granted; the implementation must call one of grant() or reject() for every request.- Parameters:
video
- "id" value from the bundle for the video source to use, or null when video is not requested.audio
- "id" value from the bundle for the audio source to use, or null when audio is not requested.
-
grant
@UiThread default void grant(@Nullable GeckoSession.PermissionDelegate.MediaSource video, @Nullable GeckoSession.PermissionDelegate.MediaSource audio) Called by the implementation after permissions are granted; the implementation must call one of grant() or reject() for every request.- Parameters:
video
- MediaSource for the video source to use (must be an original MediaSource object that was passed to the implementation); or null when video is not requested.audio
- MediaSource for the audio source to use (must be an original MediaSource object that was passed to the implementation); or null when audio is not requested.
-
reject
@UiThread default void reject()Called by the implementation when permissions are not granted; the implementation must call one of grant() or reject() for every request.
-