pipParticipantAttribute

0

Hi, in IVS service, I'm trying to set the pipParticipantAttribute to the first video call participant like described here: https://docs.aws.amazon.com/ivs/latest/RealTimeAPIReference/API_PipConfiguration.html https://docs.aws.amazon.com/ivs/latest/RealTimeAPIReference/API_ParticipantTokenConfiguration.html

My goal is to have a server-side composition with the participant #1 in the pip slot.

And about the pipParticipantAttribute it's not so clear to me what does it means:

A participant with this attribute set to "true" (as a string value) in ParticipantTokenConfiguration is placed in the PiP slot

But "this attribute" means what attribute?

I tryed some combinations but nothing seems to works.

in the createStage I tryed to set:

'participantTokenConfigurations' => [
                        [
                            'attributes' => ['pip-slot-1' => 'true']

or

'participantTokenConfigurations' => [
                        [
                            'attributes' => [pipParticipantAttribute' => 'true']

and in the startComposition I tryed to set:

'layout' => [
                'pip' => [
                    'gridGap' => 0,
                    'omitStoppedVideo' => true,
                    'pipBehavior' => 'DYNAMIC',
                    'pipHeight' => 128,
                    'pipOffset' => 0,
                    'pipParticipantAttribute' => '1',
                    'pipPosition' => 'BOTTOM_RIGHT',
                    'pipWidth' => 72,
                    'videoFillMode' => 'CONTAIN',
                ],
            ],

or

'layout' => [
                'pip' => [
                    'gridGap' => 0,
                    'omitStoppedVideo' => true,
                    'pipBehavior' => 'DYNAMIC',
                    'pipHeight' => 128,
                    'pipOffset' => 0,
                    'pipParticipantAttribute' => 'true',
                    'pipPosition' => 'BOTTOM_RIGHT',
                    'pipWidth' => 72,
                    'videoFillMode' => 'CONTAIN',
                ],
            ],

Thanks

asked 2 months ago24 views
1 Answer
0

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:

  1. 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']
    ]
]
  1. 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

profile picture
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions