ScreenRecordService

Enables the screen recording function.\n\nThere is a different recording mode (ScreenRecordMode) for each platform. For Android, it is recorded in ScreenAndGameAudioAndMic mode. For Windows, it is recorded in ScreenAndMic mode. If you select a mode that does not suit your environment, the screen will be recorded in a supported recording mode.

# Methods

[{"index":"string FinishRecordAndWait() (ClientOnly) (Yield)","0":"Ends the recording. Once the file is saved, you'll see the filepath it was stored under.The filepath for StartRecordToFileAndWait() is as follows.Windows: My PC > Videos > MapleStory Worlds > World ID > MapleStory Worlds_*.mp4Mac: Home > Movies > MapleStory Worlds > World ID > MapleStory Worlds_*.mp4Android: Internal memory > Android > data > com.nexon.mod > files > MapleStory Worlds > World ID > MapleStoryWorlds_*.mp4iOS: File > My iPhone > MaplestoryWorlds > World ID > MapleStory Worlds_*.mp4The filepath for StartRecordToPhotoLibraryAndWait() is as follows.Windows: My PC > Videos > MapleStory Worlds > World ID > MapleStory Worlds_*.mp4Mac: Home > Movies > MapleStory Worlds > World ID > MaplestoryWorlds_*.mp4Android: Photo GalleryiOS: Photos"}]

[{"index":"table GetMicrophoneDevicesAndWait() (ClientOnly) (Yield)","0":"Returns available microphone device information."}]

[{"index":"int32 GetMicrophoneIndexForRecording() (ClientOnly)","0":"Returns the index of the microphone device currently being used for recording."}]

[{"index":"boolean IsRecording() (ClientOnly)","0":"Returns if there is a recording in progress."}]

[{"index":"int32 RemainRecordTime() (ClientOnly)","0":"Returns the remaining recording time."}]

[{"index":"void SetMicrophoneIndexForRecording(int32 newIndex) (ClientOnly)","0":"Specifies the microphone device to be used for recording. newIndex is the index of the microphone to set."}]

[{"index":"ScreenRecordStartResult StartRecordToFileAndWait(ScreenRecordMode recordMode, boolean excludeSystemUI = false, func finishRecordCallback = nil) (ClientOnly) (Yield)","0":"Starts recording. Used to share recorded video in combination with the MobileShareService. The maximum recording time is 2 minutes. When recording ends, the video is saved in the file library, and the function passed to finishRecordCallback is called. The parameter of finishRecordCallback is the save path.When this function is called in Windows or Mac environments, StartRecordToPhotoLibraryAndWait(ScreenRecordMode, boolean) is called instead."}]

[{"index":"ScreenRecordStartResult StartRecordToPhotoLibraryAndWait(ScreenRecordMode recordMode, boolean excludeSystemUI = false) (ClientOnly) (Yield)","0":"Makes a request to start recording. Returns true if recording has started.If it is saved in the device's gallery or photo library, it cannot be shared through MobileShareService."}]

##### inherited from Service:

[{"index":"EventHandlerBase ConnectEvent(string key, IScriptFunction eventHandler)","0":"Links events. When a key-type event occurs in this service, a handler is notified. The handler receives event parameters."}]

[{"index":"EventHandlerBase ConnectEvent(Type eventType, IScriptFunction eventHandler)","0":"Links events. This service notifies a handler when an eventType event occurs. The handler receives event parameters."}]

[{"index":"boolean DisconnectEvent(string key, EventHandlerBase eventHandler)","0":"Disconnects the event with the key-type event and the handler."}]

[{"index":"boolean DisconnectEvent(Type eventType, EventHandlerBase eventHandler)","0":"Disconnects the eventType event from its handler."}]

[{"index":"void SendEvent(EventType sendEvent)","0":"Generates an event."}]

# Caution

Not every platform supports every recording mode.

For Android, if you select ScreenRecordMode.ScreenAndMic, it automatically reverts to ScreenAndGameAudioAndMic. For Windows, if you select ScreenRecordMode.ScreenAndGameAudioAndMic, it automatically reverts to ScreenAndMic.

[{"Recording Mode":"ScreenOnly","Description":"Only records the screen.","Windows\/macOS":"O","iOS":"O","Android":"O"},{"Recording Mode":"ScreenAndGameAudio","Description":"Records the screen and game sound.","Windows\/macOS":"O","iOS":"O","Android":"O"},{"Recording Mode":"ScreenAndMic","Description":"Records the screen and microphone.","Windows\/macOS":"O","iOS":"O","Android":"X"},{"Recording Mode":"ScreenAndGameAudioAndMic","Description":"Records the screen, game sound, and microphone.","Windows\/macOS":"X","iOS":"O","Android":"O"}]

# SeeAlso

  * MobileShareService
  * [Record and Share Game Screen](/docs?postId=997)