Skip to content

Commit ae31d41

Browse files
committed
Allow to customize subscriber css
1 parent 97d8d2f commit ae31d41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/live_ex_webrtc/subscriber.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ defmodule LiveExWebRTC.Subscriber do
44
alias ExWebRTC.{MediaStreamTrack, PeerConnection, SessionDescription}
55

66
def render(assigns) do
7+
assigns = assign_new(assigns, :class, fn -> "" end)
8+
79
~H"""
8-
<video id={@id} phx-hook="Subscriber" controls autoplay muted></video>
10+
<video id={@id} phx-hook="Subscriber" class={@class} controls autoplay muted></video>
911
"""
1012
end
1113

0 commit comments

Comments
 (0)