How AWS Elemental Live Integrates with ActionScript - AWS Elemental Live

This is version 2.18 of the AWS Elemental Live documentation. This is the latest version. For prior versions, see the Previous Versions section of AWS Elemental Live and AWS Elemental Statmux Documentation.

How AWS Elemental Live Integrates with ActionScript

How Flash Arguments Are Passed to ActionScript

Variables can be passed to the Flash asset via the swf_arguments tag in the Elemental event. These variables are accessible in the ActionScript code via stage.loaderInfo.parameters.

How Squeezeback Is Implemented

On the ActionScript Side

Squeezeback commands must be set up in ActionScript using You could set up this call so that it is executed, for example, in an event listener to the ActionScript ENTER_FRAME event.

The signature of the call() method must contain only five parameters:

  • squeezeback

  • x

  • y

  • width

  • height

These are the only parameters that AWS Elemental Live handles.Parsing of the parameters is case-sensitive.

Examples of Squeezeback

This example instructs AWS Elemental Live to perform squeezeback on the underlying video at coordinates 0,0 (which positions its upper left corner in the upper left corner of the screen) and to resize the underlying video to 120 x 60 pixels. "squeezeback", "x=0", "y=0", "width=120", "height=60"; )

This example positions the video it at coordinates 1040,560 and to resize the underlying video to 240 x 160 pixels. (This positions it in the bottom right corner of a 1280 x 720 frame.) "squeezeback", "x=1040", "y=560", "width=120", "height=60"; )

The command must be entered exactly as shown above, with each parameter in quotes. The values for the position and size parameters must be integers. Parameters are case-sensitive.

On the AWS Elemental Live Side

With the first squeezeback command, AWS Elemental Live resizes and/or positions the underlying video frame. This size and position are permanent: the underlying video does not snap back with the next frame. You are free to use any sort of squeezeback you like, including: distorting aspect ratio, smoothly adjusting squeezeback coordinates over time, or suddenly snapping to new coordinates.

The maximum frequency for squeezeback commands is based on the framerate of the underlying video. If the framerate is 60 fps, then AWS Elemental Live can send a command every 1/60 second.