getSceneItemIndex method

Future<int> getSceneItemIndex({
  1. required String sceneName,
  2. required int sceneItemId,
})

Gets the index position of a scene item in a scene.

An index of 0 is at the bottom of the source list in the UI.

Scenes and Groups

  • Complexity Rating: 3/5
  • Latest Supported RPC Version: 1
  • Added in v5.0.0

Implementation

Future<int> getSceneItemIndex({
  required String sceneName,
  required int sceneItemId,
}) async {
  final response = await obsWebSocket.sendRequest(Request(
    'GetSceneItemIndex',
    requestData: {
      'sceneName': sceneName,
      'sceneItemId': sceneItemId,
    },
  ));

  return IntegerResponse.fromJson(response!.responseData!).itemId;
}