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.UpdateUser(ctx, "<id>", "<value>", components.RoomUserUpdatePayload{
CanPublish: livepeergo.Bool(true),
CanPublishData: livepeergo.Bool(true),
})
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.UpdateUser(ctx, "<id>", "<value>", components.RoomUserUpdatePayload{
CanPublish: livepeergo.Bool(true),
CanPublishData: livepeergo.Bool(true),
})
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.
Whether a user is allowed to publish audio/video tracks (i.e. their microphone and webcam)
true
Whether a user is allowed to publish data messages to the room
true
User defined payload to store for the participant
Success
Cette page vous a-t-elle été utile ?