Video stream add
Jump to navigation
Jump to search
Description
video_stream_id = video_stream_add(key, x, y, width, height) video_stream_id = video_stream_add(key, x, y, width, height, state_callback) video_stream_id = video_stream_add(key, x, y, width, height, tex_x, tex_y, tex_width, tex_height)
video_stream_add is used to add a video stream to an instrument.
Return value
Argument | Type | Description |
---|---|---|
video_stream_id | ID | This value can be used for further reference. It's good practice to store this video_stream_id in your logic code. |
Arguments
# | Argument | Type | Description |
---|---|---|---|
1 | key | String | Video stream key, this key is used to determine which video stream you wish to show. See list below for available video stream keys. |
2 | x | Number | Left point of the canvas where your video stream should be shown. |
3 | y | Number | Top point of the canvas where your video stream should be shown. |
4 | width | Number | The video stream width on the canvas. |
5 | height | Number | The video stream height on the canvas. |
6 | tex_x | Number | (Optional) Left point of texture viewport. |
7 | tex_y | Number | (Optional) Top point of texture viewport. |
8 | tex_width | Number | (Optional) Width of texture viewport. |
9 | tex_height | Number | (Optional) Height of texture viewport. |
Keys
Key | Source | Description |
---|---|---|
xpl/panel | X-Plane 12 | Digital panels all in one texture |
xpl/gauges[0] | X-Plane 12 | Gauges texture 0 |
xpl/gauges[1] | X-Plane 12 | Gauges texture 1 |
xpl/GNS430_1 | X-Plane 12 | Primary GNS430 when there's only the GNS430 |
xpl/GNS430_2 | X-Plane 12 | Primary GNS430 when there's also a GNS530 |
xpl/GNS530_1 | X-Plane 12 | First GNS530 |
xpl/GNS530_2 | X-Plane 12 | Second GNS530 (if available) |
xpl/CDU739_1 | X-Plane 12 | Captain CDU in the A330-300, 737-800 and MD-82 |
xpl/CDU739_2 | X-Plane 12 | First officer CDU in the A330-300, 737-800 and MD-82 |
xpl/G1000_PFD_1 | X-Plane 12 | G1000 first Primary Flight Display |
xpl/G1000_MFD | X-Plane 12 | G1000 Multi Functional Display |
xpl/G1000_PFD_2 | X-Plane 12 | G1000 second Primary Flight Display (if available) |
xpl/CDU815_1 | X-Plane 12 | Captain CDU in the Citation X |
xpl/CDU815_2 | X-Plane 12 | First officer CDU in the Citation X |
xpl/Primus_PFD_1 | X-Plane 12 | |
xpl/Primus_PFD_2 | X-Plane 12 | |
xpl/Primus_MFD_1 | X-Plane 12 | |
xpl/Primus_MFD_2 | X-Plane 12 | |
xpl/Primus_MFD_3 | X-Plane 12 | |
xpl/Primus_RMU_1 | X-Plane 12 | |
xpl/Primus_RMU_2 | X-Plane 12 |
Example (complete texture)
-- Create a new video stream for the X-plane PFD
my_video_stream = video_stream_add("xpl/G1000_PFD_1", 0, 0, 1024, 768)
Example (part of texture)
-- Create a new video stream for a small part of the gauges texture
my_video_stream = video_stream_add("xpl/gauges[0]", 0, 0, 1024, 768, 200, 200, 400, 400)