- Newest
- Most votes
- Most comments
I understand your confusion regarding the pipParticipantAttribute in Amazon IVS (Interactive Video Service) for server-side composition. Let me clarify how this attribute works and how you should set it up correctly.
The pipParticipantAttribute is used to specify which participant should be placed in the Picture-in-Picture (PiP) slot. Here's how you should set it up:
- In the CreateStage API call: When creating the stage, you need to define a custom attribute in the ParticipantTokenConfiguration. This attribute can have any name you choose, but its value should be set to "true" for the participant you want in the PiP slot. For example:
'participantTokenConfigurations' => [
[
'attributes' => ['pip_participant' => 'true']
]
]
- In the StartComposition API call: When starting the composition, you need to specify the name of the attribute you defined in the CreateStage call. This tells the composition which attribute to look for when determining the PiP participant. For example:
'layout' => [
'pip' => [
'pipParticipantAttribute' => 'pip_participant',
// other PiP configuration options...
],
],
The key point is that the pipParticipantAttribute in the StartComposition call should match the attribute name you used in the CreateStage call, not its value.
So, to correct your attempts:
- In CreateStage, use a custom attribute name (e.g., 'pip_participant') and set its value to 'true'.
- In StartComposition, set pipParticipantAttribute to the name of your custom attribute (e.g., 'pip_participant'), not 'true' or '1'.
Remember, the attribute is set on the participant token, so when a participant joins with a token that has this attribute set to "true", they will be placed in the PiP slot during the composition.
If you're still having issues, double-check that you're creating participant tokens with the correct attributes and that participants are joining with these tokens.
Sources
PipConfiguration - Amazon IVS
ParticipantTokenConfiguration - Amazon IVS
Relevant content
- asked 3 months ago
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated 16 days ago
- AWS OFFICIALUpdated 6 months ago