diff --git a/Runtime/Scripts/Core/Participant.cs b/Runtime/Scripts/Core/Participant.cs index 5851e10a..caf3ec1e 100644 --- a/Runtime/Scripts/Core/Participant.cs +++ b/Runtime/Scripts/Core/Participant.cs @@ -9,6 +9,7 @@ using LiveKit.Internal.Threading; using LiveKit.Internal.FFI; +using System.IO; namespace LiveKit { public delegate Task RpcHandler(RpcInvocationData data); @@ -451,6 +452,9 @@ public SendTextInstruction SendText(string text, string topic) /// public SendFileInstruction SendFile(string path, StreamByteOptions options) { + if (File.Exists(path) == false) + Utils.Error("File not found"); + using var request = FFIBridge.Instance.NewRequest(); var sendFileReq = request.request; sendFileReq.LocalParticipantHandle = (ulong)Handle.DangerousGetHandle();