Debian Codegraph @

media/media.go

raw symbols SCIP
1 // Package media provides the Chrome DevTools Protocol
2 // commands, types, and events for the Media domain.
3 //
4 // This domain allows detailed inspection of media elements.
5 //
6 // Generated by the cdproto-gen command.
7 package media
8
9 // Code generated by cdproto-gen. DO NOT EDIT.
10
11 import (
12 "context"
13
14 "github.com/chromedp/cdproto/cdp"
15 )
16
17 // EnableParams enables the Media domain.
18 type EnableParams struct{}
19
20 // Enable enables the Media domain.
21 //
22 // See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-enable
23 func Enable() *EnableParams {
24 return &EnableParams{}
25 }
26
27 // Do executes Media.enable against the provided context.
28 func (p *EnableParams) Do(ctx context.Context) (err error) {
29 return cdp.Execute(ctx, CommandEnable, nil, nil)
30 }
31
32 // DisableParams disables the Media domain.
33 type DisableParams struct{}
34
35 // Disable disables the Media domain.
36 //
37 // See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-disable
38 func Disable() *DisableParams {
39 return &DisableParams{}
40 }
41
42 // Do executes Media.disable against the provided context.
43 func (p *DisableParams) Do(ctx context.Context) (err error) {
44 return cdp.Execute(ctx, CommandDisable, nil, nil)
45 }
46
47 // Command names.
48 const (
49 CommandEnable = "Media.enable"
50 CommandDisable = "Media.disable"
51 )