media.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. // Code generated by cdproto-gen. DO NOT EDIT.
  9. import (
  10. "context"
  11. "github.com/chromedp/cdproto/cdp"
  12. )
  13. // EnableParams enables the Media domain.
  14. type EnableParams struct{}
  15. // Enable enables the Media domain.
  16. //
  17. // See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-enable
  18. func Enable() *EnableParams {
  19. return &EnableParams{}
  20. }
  21. // Do executes Media.enable against the provided context.
  22. func (p *EnableParams) Do(ctx context.Context) (err error) {
  23. return cdp.Execute(ctx, CommandEnable, nil, nil)
  24. }
  25. // DisableParams disables the Media domain.
  26. type DisableParams struct{}
  27. // Disable disables the Media domain.
  28. //
  29. // See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-disable
  30. func Disable() *DisableParams {
  31. return &DisableParams{}
  32. }
  33. // Do executes Media.disable against the provided context.
  34. func (p *DisableParams) Do(ctx context.Context) (err error) {
  35. return cdp.Execute(ctx, CommandDisable, nil, nil)
  36. }
  37. // Command names.
  38. const (
  39. CommandEnable = "Media.enable"
  40. CommandDisable = "Media.disable"
  41. )