MCPcopy Create free account
hub / github.com/astercloud/aster / NewVideo

Function NewVideo

pkg/media/types.go:145–155  ·  view source on GitHub ↗

NewVideo 创建视频

(source string)

Source from the content-addressed store, hash-verified

143
144// NewVideo 创建视频
145func NewVideo(source string) (*Video, error) {
146 video := &Video{}
147
148 if strings.HasPrefix(source, "http://") || strings.HasPrefix(source, "https://") {
149 video.URL = source
150 } else {
151 return NewVideoFromFile(source)
152 }
153
154 return video, nil
155}
156
157// NewVideoFromFile 从文件创建视频
158func NewVideoFromFile(path string) (*Video, error) {

Callers 1

ConvertVideosFunction · 0.85

Calls 1

NewVideoFromFileFunction · 0.85

Tested by

no test coverage detected