up debid link
This commit is contained in:
parent
6907794858
commit
196c29cd70
@ -534,7 +534,13 @@ func (c *Client) CreateTranscode(ctx context.Context, fileID, preset string) (st
|
|||||||
return resp.TranscodeID, nil
|
return resp.TranscodeID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) GetTranscode(ctx context.Context, transcodeID string) (*StreamInfo, error) {
|
func (c *Client) GetTranscode(ctx context.Context, fileID string) (*StreamInfo, error) {
|
||||||
|
body := struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
}{
|
||||||
|
ID: fileID,
|
||||||
|
}
|
||||||
|
|
||||||
var raw struct {
|
var raw struct {
|
||||||
Success bool `json:"success"`
|
Success bool `json:"success"`
|
||||||
Value struct {
|
Value struct {
|
||||||
@ -548,12 +554,13 @@ func (c *Client) GetTranscode(ctx context.Context, transcodeID string) (*StreamI
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Size int64 `json:"size"`
|
Size int64 `json:"size"`
|
||||||
|
Source string `json:"source"`
|
||||||
} `json:"file"`
|
} `json:"file"`
|
||||||
} `json:"value"`
|
} `json:"value"`
|
||||||
}
|
}
|
||||||
|
|
||||||
path := fmt.Sprintf("stream/transcode/%s", transcodeID)
|
path := "stream/transcode/add"
|
||||||
if err := c.doJSON(ctx, "GET", path, nil, nil, &raw); err != nil {
|
if err := c.doJSON(ctx, "POST", path, nil, body, &raw); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,3 +577,5 @@ func (c *Client) GetTranscode(ctx context.Context, transcodeID string) (*StreamI
|
|||||||
}
|
}
|
||||||
return info, nil
|
return info, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user