package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"github.com/livepeer/livepeer-go/models/components"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.StartEgress(ctx, "<id>", components.RoomEgressPayload{
StreamID: "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Livepeer Point d’extrémité de l’API Studio
package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"github.com/livepeer/livepeer-go/models/components"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.StartEgress(ctx, "<id>", components.RoomEgressPayload{
StreamID: "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the Livepeer Stream to stream to
"aac12556-4d65-4d34-9fb6-d1f0985eb0a9"
Success
Cette page vous a-t-elle été utile ?