Skip to content

Commit

Permalink
Send only the first frame in send_from_file example
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Jul 15, 2024
1 parent 2ecd323 commit 553372b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/send_from_file/lib/send_from_file/peer_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ defmodule SendFromFile.PeerHandler do
@impl true
def handle_info(:send_video, state) do
# 30 =~ 1000 millisecond / 30 FPS
Process.send_after(self(), :send_video, 30)
# Process.send_after(self(), :send_video, 30)

case IVF.Reader.next_frame(state.video_reader) do
{:ok, frame} ->
Expand Down Expand Up @@ -184,7 +184,7 @@ defmodule SendFromFile.PeerHandler do
{:ok, state}

:eof ->
send(self(), :send_audio)
# send(self(), :send_audio)
Logger.info("Audio file finished. Looping...")
{:ok, reader} = Ogg.Reader.open(@audio_file)
{:ok, %{state | audio_reader: reader}}
Expand Down

0 comments on commit 553372b

Please sign in to comment.