File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -801,6 +801,19 @@ module.exports = {
801801 }
802802 } ,
803803
804+ /**
805+ * Sets the default position at which the Instabug screen recording button will be shown. Different orientations are already handled.
806+ *
807+ * (Default for `position` is `bottomRight`)
808+ *
809+ * @param position `topLeft` to show on the top left of screen , or `bottomRight` to show on the bottom right of scrren.
810+ */
811+ setVideoRecordingFloatingButtonPosition : function ( position ) {
812+ if ( Platform . OS === 'ios' ) {
813+ Instabug . setVideoRecordingFloatingButtonPosition ( position ) ;
814+ }
815+ } ,
816+
804817 /**
805818 * The event used to invoke the feedback form
806819 * @readonly
@@ -892,6 +905,18 @@ module.exports = {
892905 right : Instabug . rectMaxXEdge ,
893906 } ,
894907
908+ /**
909+ * Instabug floating buttons positions.
910+ * @readonly
911+ * @enum {number}
912+ */
913+ IBGPosition : {
914+ bottomRight : Instabug . bottomRight ,
915+ topRight : Instabug . topRight ,
916+ bottomLeft : Instabug . bottomLeft ,
917+ topLeft : Instabug . topLeft
918+ } ,
919+
895920 /**
896921 * Instabug strings
897922 * @readonly
Original file line number Diff line number Diff line change @@ -331,6 +331,10 @@ - (dispatch_queue_t)methodQueue {
331331 [Instabug setViewHierarchyEnabled: viewHirearchyEnabled];
332332}
333333
334+ RCT_EXPORT_METHOD (setVideoRecordingFloatingButtonPosition:(IBGPosition)position) {
335+ [Instabug setVideoRecordingFloatingButtonPosition: position];
336+ }
337+
334338RCT_EXPORT_METHOD (isRunningLive:(RCTResponseSenderBlock)callback) {
335339 BOOL result = NO ;
336340#if TARGET_OS_SIMULATOR
@@ -374,6 +378,11 @@ - (NSDictionary *)constantsToExport
374378 @" rectMaxXEdge" : @(CGRectMaxXEdge),
375379 @" rectMaxYEdge" : @(CGRectMaxYEdge),
376380
381+ @" bottomRight" : @(IBGPositionBottomRight),
382+ @" topRight" : @(IBGPositionTopRight),
383+ @" bottomLeft" : @(IBGPositionBottomLeft),
384+ @" topLeft" : @(IBGPositionTopLeft),
385+
377386 @" localeArabic" : @(IBGLocaleArabic),
378387 @" localeChineseSimplified" : @(IBGLocaleChineseSimplified),
379388 @" localeChineseTraditional" : @(IBGLocaleChineseTraditional),
Original file line number Diff line number Diff line change 77//
88
99#import " RCTConvert+InstabugEnums.h"
10- #import < Instabug /IBGTypes.h>
10+ #import < InstabugCore /IBGTypes.h>
1111
1212@implementation RCTConvert (InstabugEnums)
1313
@@ -71,6 +71,13 @@ @implementation RCTConvert (InstabugEnums)
7171 @" colorThemeDark" : @(IBGColorThemeDark)
7272 }), IBGColorThemeLight, integerValue);
7373
74+ RCT_ENUM_CONVERTER (IBGPosition, (@{
75+ @" bottomRight" : @(IBGPositionBottomRight),
76+ @" topRight" : @(IBGPositionTopRight),
77+ @" bottomLeft" : @(IBGPositionBottomLeft),
78+ @" topLeft" : @(IBGPositionTopLeft)
79+ }), IBGPositionBottomRight, integerValue);
80+
7481RCT_ENUM_CONVERTER (IBGString, (@{
7582 @" shakeHint" : @(IBGStringShakeHint),
7683 @" swipeHint" : @(IBGStringSwipeHint),
You can’t perform that action at this time.
0 commit comments