Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC Components #1

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open

WebRTC Components #1

wants to merge 46 commits into from

Conversation

FelonEkonom
Copy link
Member

No description provided.

@FelonEkonom FelonEkonom force-pushed the implement-webrtc-components branch from ee595c4 to 7d2f4cc Compare February 13, 2025 09:40
@FelonEkonom FelonEkonom self-assigned this Feb 17, 2025
@FelonEkonom FelonEkonom requested review from mat-hek and kraleppa and removed request for mat-hek and kraleppa February 19, 2025 15:08
Copy link
Member

@mat-hek mat-hek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please debug the initial stream lag and high CPU usage

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's create a proper readme

  • write what this example does
  • mention which files are important
  • remove the Phoenix links
  • mention that this uses boombox

ingress_signaling = Membrane.WebRTC.Signaling.new()
egress_signaling = Membrane.WebRTC.Signaling.new()

{:ok, _boombox_pid} =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually a Task pid, not a boombox pid

Comment on lines 38 to 41
~H"""
<Capture.live_render socket={@socket} capture={"mediaCapture"} />
<Player.live_render socket={@socket} player={"videoPlayer"} />
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a preview here too, that would display the stream from the camera directly, without sending it through WebRTC. Maybe the Capture component could have an option to display the preview as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the directory to membrane_webrtc_live

@FelonEkonom FelonEkonom requested a review from mat-hek February 26, 2025 14:12
Copy link
Member

@mat-hek mat-hek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have 100% CPU usage and a lag sometimes. Are the fixes applied on this branch?

Comment on lines 217 to 221
# this is a hack to supress dialyzer, that for some reason thinks that `message`
# is a map, while it is a binary
message =
apply(__MODULE__, :identity, [message])
|> Jason.decode!()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is that the callback typing expects that the message is a map: https://hexdocs.pm/phoenix_live_view/Phoenix.LiveComponent.html#c:handle_event/3 Maybe it should be serialized and parsed automatically by LiveView?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants