RESTful API type definition
This page lists all the type definitions of the Media Push RESTful API.
audioOptions
The audio transcoding configuration of the Converter.
Field | Type | Descriptions |
---|---|---|
codecProfile | (Optional)String | The audio codec output by the Converter. The following values are supported: (Default): MPEG-4 AAC LCHE-AAC : High-Efficiency AAC |
sampleRate | (Optional) Number | The audio coding sampling rate (Hz) output by the Converter, which can can be 32000 , 44100, or 48000 (Default value). |
bitrate | (Optional) Number | The audio encoding bit rate (Kbps) output by the Converter. The value range is [32,128]. The default value is 48. If the audio codec is LC-AAC, the recommended audio code rate range is [32,112]. If the audio codec is HE-AAC, the recommended audio code rate range is [40,96]. |
audioChannels | (Optional) Number | The number of audio channels output by the Converter , which can be 1 (Default) or 2 . |
rtcStreamUids | (Optional) JSON Array of Numbers | The user IDs of the users participating in the mixing. |
volumes | (Optional) JSON Array | Set the volume of users participating in the mixing.rtcStreamUids ).Update method to adjust the volume of the specified user. Each time the Update request is successful, the volume of other users in the mixing is reseted to the default value (100 ). |
volumes.rtcStreamUid | Number | The user IDs of the mixing users to set the volume.volumes.rtcStreamUid needs to exist in the rtcStreamUids array, otherwise the request fails with a response status code of 400 . |
volumes.volume | Number | The volume of the specified mix user. The default value is 100 , and the value range is [0, 200]. |
videoOptions
The video transcoding configuration of the Converter.
canvas
The video canvas.
Field | Type | Descriptions |
---|---|---|
width | (Required) Number | The width of the canvas (pixels). The value range is [66,1920]. |
height | (Required) Number | The height of the canvas (pixels). The value range is [66,1920]. |
color | (Optional) Number | The background color of the canvas. This is an RGB color value, expressed as a decimal number. For example, 255 represents blue. The value range is [0,16777215]. The default value is 0, which is black. |
layout
The content description of the video screen on the canvas.
layout.RtcStreamView
The video screen of each user on the canvas.
Field | Type | Descriptions |
---|---|---|
rtcStreamUid | (Required) Number | The user ID of the user to which the video stream belongs. |
region | (Required) JSON Object | The display area of the user's video screen on the canvas. If the video screen dimensions exceed the canvas, the screen will be cropped, and the excess image will not be displayed. |
region.xPos | (Required) Number | The x coordinate (pixels) of the screen on the canvas. This is the lateral displacement relative to the origin, where the upper left corner of the canvas is the origin, and the x coordinate is the upper left corner of the screen. |
region.yPos | (Required) Number | The y coordinate (pixels) of the screen on the canvas. This is the longitudinal displacement relative to the origin, where the upper left corner of the canvas is the origin, and the y coordinate is the upper left corner of the screen. |
region.zIndex | (Required) Number | The layer number of the screen. The value range is [0,100]. 0 represents the lowest layer. 100 represents the top layer. |
region.width | (Required) Number | The width of the screen (pixels). |
region.height | (Required) Number | The height of the screen (pixels). |
fillMode | (Optional) String | The display types of the screen.fill : (Default) Under the premise of maintaining the aspect ratio, zoom the screen to fill the container. fit : Zoom the screen while maintaining the aspect ratio so that the screen is in the container Full display. |
placeholderImageUrl | (Required) String | The HTTP(S) URL of the substitute image. Images in JPG, PNG and GIF formats are supported. When the user in the channel does not publish the video stream, if this field is set, this substitute image will replace the user's video screen; otherwise, the last frame of the user's video will be displayed. |
layout.ImageView
The video image on the canvas, which can be used as a watermark.
Field | Type | Descriptions |
---|---|---|
imageUrl | (Required) String | The HTTP(S) URL of the image. Images in JPG, PNG and GIF formats are supported. |
region | (Required) JSON Object | The display area of the image on the canvas. If the video screen dimensions exceed the canvas, the screen will be cropped, and the excess image will not be displayed. |
region.xPos | (Required) Number | The x coordinate (pixels) of the image on the canvas. This is the lateral displacement relative to the origin, where the upper left corner of the canvas is the origin, and the x coordinate is the upper left corner of the screen. |
region.yPos | (Required) Number | The y coordinate (pixels) of the picture on the canvas. This is the longitudinal displacement relative to the origin, where the upper left corner of the canvas is the origin and the y coordinate is the upper left corner of the screen. |
region.zIndex | (Required) Number | The layer number of the image. The value range is [0,100]. 0 represents the lowest layer. 100 represents the top layer. |
region.width | (Required) Number | The width of the image (pixels). |
region.height | (Required) Number | The height of the image (pixels). |
fillMode | (Optional) String | The display types of the image. fill : Under the premise of maintaining the aspect ratio, zoom the image so that the image fills the container. fit : zoom the image while maintaining the aspect ratio so that the image is in the container Full display. |
vertical
Vertical layout. The field is optional.
See Set Vertical Layout.
Field | Type | Descriptions |
---|---|---|
maxResolutionUid | Number | The user ID of the user who is displayed in the large window. If maxResolutionUid is not set, the user with the loudest volume when the layout refreshes is displayed in the large window. maxResolutionUid may cause the screen layout to change every 3 seconds. If the layout needs to be stable, set this parameter. |
fillMode | String | The display options of the screen:fill : (Default) Zoom the image to fill the window completely while maintaining the aspect ratio of the image.fit : Zoom the image only until it fills the window vertically or horizontally, displaying the entire image while possibly leaving some of the window blank. |
seiOptions
The user SEI information carried in the output video stream. The field is optional.
Field | Type | Descriptions |
---|---|---|
source | JSON Object | Set the data source of SEI information. The default value is empty. |
source.metadata | Bool | Set whether to pass in metadata-type SEI information.true : Metadata-type SEI information is passed in.false : Metadata-type SEI information is not passed in. |
source.datastream | Bool | Set whether to pass in Agora Datastream-type SEI information type. |
source.customized | JSON Object | Custom SEI information. Custom SEI information is converted into Agora SEI information. The default value is empty. |
source.customized.prefixForAgoraSei | String | Set the payload prefix of SEI information. The maximum length is 32 characters, and the default value is blank. |
source.customized.payload | String | Set the payload of the SEI information. The maximum length is 4096 characters, and the default value is blank. When the SEI information is converted into Agora SEI information, the payload is corresponds to the app_data of the SEI. |
sink | JSON Object | Set the attributes of the output SEI information. The default value is empty. |
sink.type | Int | Set the payload type of the output SEI information. The default value is 100. |