Fix audio input preview in app sessions

This commit is contained in:
Jonatan Kłosko 2024-05-30 12:20:35 +07:00
parent 71f6293246
commit 52240a1677

View file

@ -317,6 +317,17 @@ defmodule LivebookWeb.AppSessionLive do
{:noreply, socket}
end
@impl true
def handle_call({:get_input_value, input_id}, _from, socket) do
reply =
case socket.private.data.input_infos do
%{^input_id => %{value: value}} -> {:ok, socket.assigns.session.id, value}
%{} -> :error
end
{:reply, reply, socket}
end
@impl true
def handle_info({:operation, operation}, socket) do
{:noreply, handle_operation(socket, operation)}