/// <inheritdoc/> public bool UseForVideoRecording(ActivityId videoRecording) { if (videoRecording == null) { throw new ArgumentNullException(nameof(videoRecording)); } if (IsAvailable()) { return(AssumeRole(RoleInActivity.Recording(videoRecording))); } return(false); }
/// <inheritdoc/> public bool StopUsingForAudioRecording(ActivityId audioRecording) { if (audioRecording == null) { throw new ArgumentNullException(nameof(audioRecording)); } if (IsAudioRecording(audioRecording)) { MakeAvailable(); return(true); } return(false); }
/// <summary> /// Creates a <see cref="RoleInActivity"/> instance indicating a recording role. /// during an activity. /// </summary> /// <param name="activity"> /// The activity during that the the recording happens. /// </param> /// <returns> /// The <see cref="RoleInActivity"/> instance indicating a recording role. /// </returns> public static RoleInActivity Recording(ActivityId activity) { return(new RoleInActivity(DeviceRole.Recording, activity)); }
bool IsAudioRecording(ActivityId audioRecording) { return(IsInRole(RoleInActivity.Recording(audioRecording))); }