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