Debian Codegraph @

api/requests/media_control/xx_generated.getmediaduration.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 GetMediaDurationParams represents the params body for the "GetMediaDuration" request.
9 Get the length of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
10 Note: For some reason, for the first 5 or so seconds that the media is playing, the total duration can be off by upwards of 50ms.
11 Since 4.9.0.
12 */
13 type GetMediaDurationParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationParams# 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`/GetMediaDurationParams#ParamsBasic.
15
16 // Source name.
17 SourceNamescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationParams#SourceName. string `json:"sourceName,omitempty"`
18 }
19
20 // GetSelfName just returns "GetMediaDuration".
21 func (o *GetMediaDurationParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationParams#) GetSelfNamescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationParams#GetSelfName().() string {
22 return "GetMediaDuration"
23 }
24
25 /*
26 GetMediaDurationResponse represents the response body for the "GetMediaDuration" request.
27 Get the length of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
28 Note: For some reason, for the first 5 or so seconds that the media is playing, the total duration can be off by upwards of 50ms.
29 Since v4.9.0.
30 */
31 type GetMediaDurationResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationResponse# struct {
32 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`/GetMediaDurationResponse#ResponseBasic.
33
34 // The total length of media in milliseconds..
35 MediaDurationscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationResponse#MediaDuration. int `json:"mediaDuration,omitempty"`
36 }
37
38 // GetMediaDuration 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#) GetMediaDurationscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/Client#GetMediaDuration().(params *GetMediaDurationParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationParams#) (*GetMediaDurationResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationResponse#, error) {
40 data := &GetMediaDurationResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/media_control`/GetMediaDurationResponse#{}
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 }