mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-10 06:01:44 +08:00
Fix audio input preview in app sessions
This commit is contained in:
parent
71f6293246
commit
52240a1677
1 changed files with 11 additions and 0 deletions
|
|
@ -317,6 +317,17 @@ defmodule LivebookWeb.AppSessionLive do
|
||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
end
|
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
|
@impl true
|
||||||
def handle_info({:operation, operation}, socket) do
|
def handle_info({:operation, operation}, socket) do
|
||||||
{:noreply, handle_operation(socket, operation)}
|
{:noreply, handle_operation(socket, operation)}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue