Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Code not working #3

Open
Fyb3roptik opened this issue Mar 19, 2019 · 0 comments
Open

Example Code not working #3

Fyb3roptik opened this issue Mar 19, 2019 · 0 comments

Comments

@Fyb3roptik
Copy link

vid := "1234"
s3 := "s3://accesskey:secretkey@mybucket"

config := coconut.Config{
  Vars: coconut.Vars{
    "vid": vid,
    "s3": s3,
  },
  Source: "http://yoursite.com/media/video.mp4",
  Webhook: "http://mysite.com/webhook/coconut?videoId=$vid",
  Outputs: coconut.Outputs{
    "mp4": "$s3/videos/video_$vid.mp4",
    "webm": "$s3/videos/video_$vid.webm",
    "jpg:300x": "$s3/previews/thumbs_#num#.jpg, number=3",
  }
}

if job, err := coconut.NewJob(config, "api-key"); err != nil {
  fmt.Println("Error:", err)
} else {
  fmt.Println("Job created:", job.Id)
}

Outputs should have a comma after it like this

vid := "1234"
s3 := "s3://accesskey:secretkey@mybucket"

config := coconut.Config{
  Vars: coconut.Vars{
    "vid": vid,
    "s3": s3,
  },
  Source: "http://yoursite.com/media/video.mp4",
  Webhook: "http://mysite.com/webhook/coconut?videoId=$vid",
  Outputs: coconut.Outputs{
    "mp4": "$s3/videos/video_$vid.mp4",
    "webm": "$s3/videos/video_$vid.webm",
    "jpg:300x": "$s3/previews/thumbs_#num#.jpg, number=3",
  },
}

if job, err := coconut.NewJob(config, "api-key"); err != nil {
  fmt.Println("Error:", err)
} else {
  fmt.Println("Job created:", job.Id)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant