Skip to content

Commit

Permalink
[PBE-6092] Add API for reporting input devices (permitted or not, ava…
Browse files Browse the repository at this point in the history
…ilable ones, currently selected one), thermal state etc (#748)
  • Loading branch information
su225 authored Sep 24, 2024
2 parents 847346c + 712b7ce commit b58378e
Show file tree
Hide file tree
Showing 7 changed files with 1,921 additions and 472 deletions.
780 changes: 589 additions & 191 deletions protobuf/video/sfu/models/models.pb.go

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions protobuf/video/sfu/models/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,44 @@ enum WebsocketReconnectStrategy {
// SDK should migrate to a new SFU instance
WEBSOCKET_RECONNECT_STRATEGY_MIGRATE = 4;
};

message InputDevices {
repeated string available_devices = 1;
string current_device = 2;
bool is_permitted = 3;
}

message AndroidState {
AndroidThermalState thermal_state = 1;
bool is_power_saver_mode = 2;
}

message AppleState {
AppleThermalState thermal_state = 1;

// https://developer.apple.com/documentation/foundation/processinfo/1617047-islowpowermodeenabled
bool is_low_power_mode_enabled = 2;
}

// AndroidThermalState is reported by the Android API. The full list of values is documented here
// https://developer.android.com/reference/android/os/PowerManager.html#getCurrentThermalStatus()
enum AndroidThermalState {
ANDROID_THERMAL_STATE_UNSPECIFIED = 0;
ANDROID_THERMAL_STATE_NONE = 1;
ANDROID_THERMAL_STATE_LIGHT = 2;
ANDROID_THERMAL_STATE_MODERATE = 3;
ANDROID_THERMAL_STATE_SEVERE = 4;
ANDROID_THERMAL_STATE_CRITICAL = 5;
ANDROID_THERMAL_STATE_EMERGENCY = 6;
ANDROID_THERMAL_STATE_SHUTDOWN = 7;
}

// AppleThermalState is the thermal state as reported by Apple devices when available or applicable to the platform.
// The full list of states (enum) is available here: https://developer.apple.com/documentation/foundation/processinfo/thermalstate
enum AppleThermalState {
APPLE_THERMAL_STATE_UNSPECIFIED = 0;
APPLE_THERMAL_STATE_NOMINAL = 1;
APPLE_THERMAL_STATE_FAIR = 2;
APPLE_THERMAL_STATE_SERIOUS = 3;
APPLE_THERMAL_STATE_CRITICAL = 4;
}
Loading

0 comments on commit b58378e

Please sign in to comment.