mixer

package
v0.0.0-...-eec6432 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AUDIO_EXT = ".aac"
View Source
const BASH = "/bin/sh"
View Source
const BUCKET_NAME = "study-all-in"
View Source
const CACHEFOLDER = "/tmp/mixer/"
View Source
const ENDPOINT = "oss-cn-beijing.aliyuncs.com"
View Source
const FFMPEG = "ffmpeg"

根据实际机器配置

View Source
const OSS_KEY = "LTAI3tmAj2frH3n2"
View Source
const OSS_PREFIX = "mixer/"
View Source
const OSS_SEC = "xxxxxxxxxxxxxxxxxxxxxx"
View Source
const STATUS_FAIL = "fail"
View Source
const STATUS_SUCCESS = "success"

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(filepath string, url string) error

func HandleError

func HandleError(err error, w http.ResponseWriter)

func HandleSuccess

func HandleSuccess(w http.ResponseWriter, path string)

func PathExists

func PathExists(path string) (bool, error)

Types

type AudioObject

type AudioObject struct {
	Record struct {
		Url      string `json:"url"`
		Path     string
		Duration float64
	} `json:"record"`

	Background struct {
		Url           string `json:"url"`
		Path          string
		Duration      float64
		FixedFilePath string //拼接或裁剪完的音频地址
	} `json:"background"`

	ConcatFileList string //ffmpeg 连接音频时需要使用的文件
	// contains filtered or unexported fields
}

type MediaInfo

type MediaInfo struct {
	Format struct {
		Duration string `json:"duration"`
	} `json:"format"`
}

type MixerAPI

type MixerAPI struct{}

func (*MixerAPI) ServeHTTP

func (u *MixerAPI) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ResponseMessage

type ResponseMessage struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Path    string `json:"path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL