Debian Codegraph @

api/requests/media_control/xx_generated.playpausemedia.go

raw symbols SCIP
1 // This file has been automatically generated. Don't edit it.
2
3 package mediacontrolscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/
4
5 import requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/ "github.com/andreykaipov/goobs/api/requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/"
6
7 /*
8 PlayPauseMediaParams represents the params body for the "PlayPauseMedia" request.
9 Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
10 Note :Leaving out `playPause` toggles the current pause state
11 Since 4.9.0.
12 */
13 type PlayPauseMediaParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams# struct {
14 requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/.ParamsBasicscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#ParamsBasic.
15
16 // (optional) Whether to pause or play the source. `false` for play, `true` for pause.
17 PlayPausescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#PlayPause. *bool `json:"playPause,omitempty"`
18
19 // Source name.
20 SourceNamescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#SourceName. string `json:"sourceName,omitempty"`
21 }
22
23 // GetSelfName just returns "PlayPauseMedia".
24 func (o *PlayPauseMediaParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#) GetSelfNamescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#GetSelfName().() string {
25 return "PlayPauseMedia"
26 }
27
28 /*
29 PlayPauseMediaResponse represents the response body for the "PlayPauseMedia" request.
30 Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
31 Note :Leaving out `playPause` toggles the current pause state
32 Since v4.9.0.
33 */
34 type PlayPauseMediaResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaResponse# struct {
35 requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/.ResponseBasicscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaResponse#ResponseBasic.
36 }
37
38 // PlayPauseMedia sends the corresponding request to the connected OBS WebSockets server.
39 func (c *Clientscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/Client#) PlayPauseMediascip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/Client#PlayPauseMedia().(params *PlayPauseMediaParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaParams#) (*PlayPauseMediaResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaResponse#, error) {
40 data := &PlayPauseMediaResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/PlayPauseMediaResponse#{}
41 if err := c.SendRequestscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/Client#SendRequest().(params, data); err != nil {
42 return nil, err
43 }
44 return data, nil
45 }