-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
ee595c4
to
7d2f4cc
Compare
There was a problem hiding this 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
example_project/README.md
Outdated
There was a problem hiding this comment.
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} = |
There was a problem hiding this comment.
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
~H""" | ||
<Capture.live_render socket={@socket} capture={"mediaCapture"} /> | ||
<Player.live_render socket={@socket} player={"videoPlayer"} /> | ||
""" |
There was a problem hiding this comment.
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?
lib/boombox_live/webrtc/capture.ex
Outdated
There was a problem hiding this comment.
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
There was a problem hiding this 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?
lib/membrane_webrtc_live/capture.ex
Outdated
# 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!() |
There was a problem hiding this comment.
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?
No description provided.