mirror of
https://github.com/algora-io/tv.git
synced 2024-11-26 01:00:20 +02:00
use snapshot from video as channel og image
This commit is contained in:
parent
d8e468f731
commit
5de36fd8d7
@ -314,10 +314,12 @@ defmodule AlgoraWeb.ChannelLive do
|
||||
end
|
||||
|
||||
defp apply_action(socket, :show, params) do
|
||||
user = Accounts.get_user!(socket.assigns.channel.user_id)
|
||||
|
||||
socket
|
||||
|> assign(:page_title, socket.assigns.channel.name || params["channel_handle"])
|
||||
|> assign(:page_description, socket.assigns.channel.tagline)
|
||||
|> assign(:page_image, "#{AlgoraWeb.Endpoint.url()}/images/og/default.png")
|
||||
|> assign(:page_image, Library.get_thumbnail_url(user))
|
||||
end
|
||||
|
||||
defp show_stream_modal(socket) do
|
||||
|
@ -184,6 +184,6 @@ defmodule AlgoraWeb.ChatLive do
|
||||
socket
|
||||
|> assign(:page_title, socket.assigns.channel.name || params["channel_handle"])
|
||||
|> assign(:page_description, socket.assigns.channel.tagline)
|
||||
|> assign(:page_image, "#{AlgoraWeb.Endpoint.url()}/images/og/default.png")
|
||||
|> assign(:page_image, Library.get_thumbnail_url(socket.assigns.video))
|
||||
end
|
||||
end
|
||||
|
@ -154,6 +154,6 @@ defmodule AlgoraWeb.EmbedLive do
|
||||
socket
|
||||
|> assign(:page_title, socket.assigns.channel.name || params["channel_handle"])
|
||||
|> assign(:page_description, socket.assigns.channel.tagline)
|
||||
|> assign(:page_image, "#{AlgoraWeb.Endpoint.url()}/images/og/default.png")
|
||||
|> assign(:page_image, Library.get_thumbnail_url(socket.assigns.video))
|
||||
end
|
||||
end
|
||||
|
@ -634,7 +634,7 @@ defmodule AlgoraWeb.VideoLive do
|
||||
socket
|
||||
|> assign(:page_title, socket.assigns.channel.name || params["channel_handle"])
|
||||
|> assign(:page_description, socket.assigns.channel.tagline)
|
||||
|> assign(:page_image, "#{AlgoraWeb.Endpoint.url()}/images/og/default.png")
|
||||
|> assign(:page_image, Library.get_thumbnail_url(socket.assigns.video))
|
||||
end
|
||||
|
||||
defp show_stream_modal(socket) do
|
||||
|
Loading…
Reference in New Issue
Block a user