Molybden API
Loading...
Searching...
No Matches
media_delegates.hpp
1// Copyright (c) 2000-2023 TeamDev Ltd. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_MEDIA_DELEGATES_HPP
6#define MOLYBDEN_MEDIA_DELEGATES_HPP
7
8#include <memory>
9#include <vector>
10
11#include "molybden/base/delegate.hpp"
12#include "molybden/base/delegate_action.hpp"
13#include "molybden/media/media_device.hpp"
14
15namespace molybden {
16
17class Browser;
18
26 std::shared_ptr<Browser> browser;
27
31 std::vector<MediaDeviceInfo> media_devices;
32};
33
38 public:
40 std::unique_ptr<rpc::internal::Callback> callback);
41
49 void select(const MediaDeviceInfo& media_device_info);
50};
51
80
81} // namespace molybden
82
83#endif // MOLYBDEN_MEDIA_DELEGATES_HPP
The base API that implements classes which represent delegate's action.
Definition delegate_action.hpp:18
Delegates allow you to make decisions that affect the application behavior.
Definition delegate.hpp:30
A class that contains all media delegates.
Definition media_delegates.hpp:55
Delegate< SelectMediaDeviceArgs, SelectMediaDeviceAction > onSelectMediaDevice
Invoked when the web page asks which media input device should be used.
Definition media_delegates.hpp:78
The MediaDelegates::onSelectMediaDevice action.
Definition media_delegates.hpp:37
void select(const MediaDeviceInfo &media_device_info)
Tells the browser that the given media input device should be used.
The media audio/video input device info.
Definition media_device.hpp:35
The MediaDelegates::onSelectMediaDevice action arguments.
Definition media_delegates.hpp:22
std::vector< MediaDeviceInfo > media_devices
The list of available media input devices with the required type.
Definition media_delegates.hpp:31
std::shared_ptr< Browser > browser
The browser instance requested to select a media input device.
Definition media_delegates.hpp:26