How to execute code synchronously.?

This is the code, onHighlightsCaptured event is not getting invoked, Instead of calling turnOnCapture method, If i include here, It is getting invoked. Is it because of asynchronous behaviour? May I know how to make it synchronous?

    this.turnOnCapture(); {,"onHighlightsCaptured",JSON.stringify(info,null,2),
    console.log); });

public turnOnCapture() {{
“highlights” : {
“enable” : true,
“requiredHighlights” : [“kill”] },
“settings” : {
“gif_as_video”: false,
“max_quota_gb” : 2,
“video” : {
“sub_folder_name” : “C:\Users\91994\Videos\Overwolf”,
“fps” :30,
“width” :1920,
“height” : 1080,
“max_kbps” : 100,
“frame_interval”: 30,
“notify_dropped_frames_ratio”: 30,
“max_file_size_bytes” : 10000000,
“include_full_size_video” : false,
“disable_when_sht_not_supported” : false ,
“indication_position”: overwolf.streaming.enums.IndicationPosition.BottomLeftCorner,
“use_app_display_name” : false
}, console.log);

Hi, and thanks for the feedback.

We will check the issue and we will update you here.


It would be great that if I get an update on this soon

Have you tried to register to the onHighlightsCaptured event BEFORE calling

I have tried that too.
It’s not the case only for this scenario. Code runs asynchronously. How to make it line by line execution