View Source Upgrading to v0.16
Version 0.16 extracts the existing Endpoints to separate packages. This is to improve user
experience and remove the need to include numerous dependencies in your mix.exs
if you want to use
a certain Endpoint.
In practice, the changes come down to updating the dependencies in your mix.exs
.
Below, there are two PRs that update RTC Engine to v0.16 in our demos:
- https://github.com/membraneframework/membrane_videoroom/pull/188
- https://github.com/membraneframework-labs/membrane_live/pull/190
RTC Engine and Endpoints (Elixir)
In your mix.exs
, in deps
, you now need to include the appropriate package
for each Endpoint you use (as well as the Engine).
The good part is, you can get rid of all the dependencies tied to certain Endpoints! These
dependencies used to be marked as optional
in the Engine - now, they have been moved to the
appropriate endpoint package.
- If you're using the WebRTC Endpoint:
defp deps do
[
- {:membrane_rtc_engine, "~> 0.15.0"}
+ {:membrane_rtc_engine, "~> 0.16.0"},
+ {:membrane_rtc_engine_webrtc, "~> 0.1.0"}
]
end
- If you're using the HLS Endpoint:
defp deps do
[
- :membrane_h264_ffmpeg_plugin,
- :membrane_h264_plugin,
- :membrane_http_adaptive_stream_plugin,
- :membrane_opus_plugin,
- :membrane_aac_plugin,
- :membrane_aac_fdk_plugin,
- {:membrane_rtc_engine, "~> 0.15.0"}
+ {:membrane_rtc_engine, "~> 0.16.0"},
+ {:membrane_rtc_engine_hls, "~> 0.1.0"}
]
end
Keep in mind, though, if you're using either the Audio Mixer or the Video Compositor in the HLS Endpoint,
you still need to include the two mixer plugins in your deps
:
defp deps do
[
- :membrane_h264_ffmpeg_plugin,
- :membrane_h264_plugin,
- :membrane_http_adaptive_stream_plugin,
- :membrane_opus_plugin,
- :membrane_aac_plugin,
- :membrane_aac_fdk_plugin,
:membrane_video_compositor_plugin,
:membrane_audio_mix_plugin,
- {:membrane_rtc_engine, "~> 0.15.0"}
+ {:membrane_rtc_engine, "~> 0.16.0"},
+ {:membrane_rtc_engine_hls, "~> 0.1.0"}
]
end
- If you're using the RTSP Endpoint:
defp deps do
[
- :connection,
- :membrane_rtsp,
- :membrane_udp_plugin,
- {:membrane_rtc_engine, "~> 0.15.0"}
+ {:membrane_rtc_engine, "~> 0.16.0"},
+ {:membrane_rtc_engine_rtsp, "~> 0.1.0"}
]
end
- If you're using two (or more) different Endpoints, simply add each needed package to the
deps
list.
The module names remain the same, so you don't need to change anything in your source files.
Developing the Engine and Endpoints
Version 0.16 converts the membrane_rtc_engine
GitHub repository to a monorepo.
For development purposes, it is easiest to clone the entire repository and work locally, including the Engine and needed Endpoints using local paths:
defp deps do
[
{:membrane_rtc_engine, path: "/path/to/cloned/repository/engine/"},
{:membrane_rtc_engine_webrtc, path: "/path/to/cloned/repository/webrtc/"},
]
end
Alternatively, you can use a sparse checkout:
defp deps do
[
{:membrane_rtc_engine, github: "jellyfish-dev/membrane_rtc_engine", sparse: "engine", override: true},
{:membrane_rtc_engine_webrtc, github: "jellyfish-dev/membrane_rtc_engine", sparse: "webrtc"},
]
end
If you get any Mix errors, try adding the override: true
option to packages which others depend
upon (e.g. to the membrane_rtc_engine
package if also using membrane_rtc_engine_webrtc
).