Molybden API
Loading...
Searching...
No Matches
molybden::MediaDelegates Class Reference

A class that contains all media delegates. More...

#include <media_delegates.hpp>

Inheritance diagram for molybden::MediaDelegates:
molybden::Media

Public Attributes

Delegate< SelectMediaDeviceArgs, SelectMediaDeviceActiononSelectMediaDevice
 Invoked when the web page asks which media input device should be used.
 

Detailed Description

A class that contains all media delegates.

Member Data Documentation

◆ onSelectMediaDevice

Delegate<SelectMediaDeviceArgs, SelectMediaDeviceAction> molybden::MediaDelegates::onSelectMediaDevice

Invoked when the web page asks which media input device should be used.

If there is no media input devices of the requested type (e.g. there are no video input devices), then the callback will not be invoked).

Important: the main process will be blocked until you provide a response.

Use the following approach to register a callback:

media->onSelectMediaDevice = [](const SelectMediaDeviceArgs& args, SelectMediaDeviceAction action) {};
The MediaDelegates::onSelectMediaDevice action.
Definition media_delegates.hpp:37
The MediaDelegates::onSelectMediaDevice action arguments.
Definition media_delegates.hpp:22

In order to unregister the callback, use the reset() method:

media->onSelectMediaDevice.reset();

The documentation for this class was generated from the following file: