diff --git a/example_project/README.md b/example_project/README.md index 9ff00e5..e8d516a 100644 --- a/example_project/README.md +++ b/example_project/README.md @@ -1,18 +1,23 @@ -# ExampleProject +# Example Project -To start your Phoenix server: +Example project showing how `Membrane.WebRTC.Live.Capture` and `Membrane.WebRTC.Live.Player` can be used. - * Run `mix setup` to install and setup dependencies - * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` +It contains a simple demo, where: + - the video stream is get from the browser and sent via WebRTC to Elixir server using `Membrane.WebRTC.Live.Capture` + - then, this same video stream is re-sent again to the browser and displayed using `Membrane.WebRTC.Live.Player`. -Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. +This demo uses also [Boombox](https://hex.pm/packages/boombox). + +The most important file in the project is `example_project/lib/example_project_web/live_views/echo.ex`, that +contains the usage of `Boombox` and LiveViews defined in `membrane_webrtc_live`. + +You can also take a look at `example_project/assets/js/app.js` to see how you can use `membrane_webrtc_live` JS hooks. -Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). +## Run server -## Learn more +To start Phoenix server: - * Official website: https://www.phoenixframework.org/ - * Guides: https://hexdocs.pm/phoenix/overview.html - * Docs: https://hexdocs.pm/phoenix - * Forum: https://elixirforum.com/c/phoenix-forum - * Source: https://github.com/phoenixframework/phoenix + * Run `mix setup` to install and setup dependencies + * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` + +Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. diff --git a/example_project/lib/example_project_web/live_views/echo.ex b/example_project/lib/example_project_web/live_views/echo.ex index 75da083..eceb9d1 100644 --- a/example_project/lib/example_project_web/live_views/echo.ex +++ b/example_project/lib/example_project_web/live_views/echo.ex @@ -36,8 +36,11 @@ defmodule ExampleProjectWeb.LiveViews.Echo do def render(assigns) do ~H""" - - +

Captured stream preview

+ + +

Stream sent by the server

+ """ end end