MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / AudioComponent

Class AudioComponent

SampleApps/WebView2APISample/AudioComponent.h:11–34  ·  view source on GitHub ↗

This component handles commands from the Audio menu.

Source from the content-addressed store, hash-verified

9
10// This component handles commands from the Audio menu.
11class AudioComponent : public ComponentBase
12{
13public:
14 AudioComponent(AppWindow* appWindow);
15
16 bool HandleWindowMessage(
17 HWND hWnd,
18 UINT message,
19 WPARAM wParam,
20 LPARAM lParam,
21 LRESULT* result) override;
22
23 void ToggleMuteState();
24 void UpdateTitleWithMuteState(wil::com_ptr<ICoreWebView2_8> webview2_8);
25
26 ~AudioComponent() override;
27
28private:
29 AppWindow* m_appWindow = nullptr;
30 wil::com_ptr<ICoreWebView2> m_webView;
31
32 EventRegistrationToken m_isDocumentPlayingAudioChangedToken = {};
33 EventRegistrationToken m_isMutedChangedToken = {};
34};
35
36

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected