Skip to content

how to migration v0 to v1

lethe edited this page Dec 8, 2022 · 1 revision

How to migration v0 to v1

- addRecordEventListener
+ addEventListener

- hasRecordEventListener
+ hasListener

- setRecordProtectionScreenWithText
+ setScreenRecordScreenWithText

- setRecordProtectionScreenWithImage
+ setScreenRecordScreenWithImage

- isPreventScreenshot

- isRecording
+ isScreenRecording

- startPreventRecording
- stopPreventRecording
+ allowScreenRecord
+ preventScreenRecord

- startPreventScreenshot
- stopPreventScreenshot
+ allowScreenshot
+ preventScreenshot

+ addScreenshotListener
+ removeScreenshotListener
+ addScreenRecordListener
+ removeScreenRecordListener
+ getPreventStatus

Notice

in v1, startPreventRecording, stopPreventRecording, startPreventScreenshot, stopPreventRecording, setRecordProtectionScreenWithText, setRecordProtectionScreenWithImage function didn't return boolean

if used return value for check status, remove or use .catch(err => {}) or try-catch

Clone this wiki locally