AVRecorder.SetScreenInput
-------------------------

Sets video input to screen.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AVRecorder](component_AVRecorder.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "AVRecorder.SetScreenInput"; AVSession { ; DisplayIndex; capturesCursor; capturesMouseClicks; cropRectLeft; cropRectBottom; cropRectWidth; cropRectHeight } ) 

**MBS**( **"AVRecorder.SetScreenInput";** /\* Sets video input to screen. \*/  
**$AVSession**; /\* The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). \*/   
**$DisplayIndex**; /\* Optional; The index of the screen.  
Derfault is zero for main screen.e.g. 0 \*/   
**$capturesCursor**; /\* Optional; Whether the cursor should be rendered to the captured output.  
By default, screen input draws the cursor in its captured output. If this parameter is zero, the captured output contains only the windows on the screen. Cursor is omitted. Note that cursor position and mouse button state at the time of capture is preserved in CMSampleBuffers emitted from screen input.e.g. 1 \*/   
**$capturesMouseClicks**; /\* Optional; Whether mouse clicks should be highlighted in the captured output.  
By default, screen input does not highlight mouse clicks in its captured output. If this parameter is 1, mouse clicks are highlighted (a circle is drawn around the mouse for the duration of the click) in the captured output.e.g. 1 \*/   
**$cropRectLeft**; /\* Optional; \*/   
**$cropRectBottom**; /\* Optional; \*/   
**$cropRectWidth**; /\* Optional; \*/   
**$cropRectHeight**) /\* Optional; \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). | $AVSession |  |
| DisplayIndex | The index of the screen.   Derfault is zero for main screen. | 0 | Optional |
| capturesCursor | Whether the cursor should be rendered to the captured output.   By default, screen input draws the cursor in its captured output. If this parameter is zero, the captured output contains only the windows on the screen. Cursor is omitted. Note that cursor position and mouse button state at the time of capture is preserved in CMSampleBuffers emitted from screen input. | 1 | Optional |
| capturesMouseClicks | Whether mouse clicks should be highlighted in the captured output.   By default, screen input does not highlight mouse clicks in its captured output. If this parameter is 1, mouse clicks are highlighted (a circle is drawn around the mouse for the duration of the click) in the captured output. | 1 | Optional |
| cropRectLeft |  |  | Optional |
| cropRectBottom |  |  | Optional |
| cropRectWidth |  |  | Optional |
| cropRectHeight |  |  | Optional |

### Result

Returns OK or error.

### Description

Sets video input to screen.  
cropRectLeft, cropRectBottom, cropRectWidth, cropRectHeight indicate the bounding rectangle of the screen area to be captured in pixels.  
Screen input captures the entire area of the display with which it is associated. To limit the capture rectangle to a subsection of the screen, set the cropRect property, which defines a smaller section of the screen in the screen's coordinate system. The origin (0,0) is the bottom-left corner of the screen.  
  
This function is not available for iOS as AVFoundation framework on iOS has no screen input class.  
### See also

- [AVRecorder.Init](AVRecorderInit.md)

### Release notes

- **Version 8.4**
    - Added [AVRecorder.SetScreenInput](http://www.mbsplugins.eu/AVRecorderSetScreenInput.shtml) function.

### Blog Entries

- [macOS Privacy and FileMaker](https://www.mbsplugins.de/archive/2020-08-11/macOS_Privacy_and_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 8.4 - Über 5400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2018-09-25/Neues_MBS_FileMaker_Plugin_84_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 8.4 - More than 5400 Functions In One Plugin](https://www.mbsplugins.de/archive/2018-09-25/MBS_FileMaker_Plugin_84_-_More/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.4pr1](https://www.mbsplugins.de/archive/2018-08-01/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th July 2018 , last changed 8th January 2019

  
[AVRecorder.SetFilePath](AVRecorderSetFilePath.md) - [AVRecorder.SetVideoDevice](AVRecorderSetVideoDevice.md)

[HTML Version](AVRecorderSetScreenInput.shtml)