DEV: Prevent videos from preloading metadata (#23807)

Preloading just metadata is not always respected by browsers, and
sometimes the whole video will be downloaded. This switches to using a
placeholder image for the video and only loads the video when the play
button is clicked.
This commit is contained in:
Blake Erickson
2023-10-12 13:47:48 -06:00
committed by GitHub
parent 460e702887
commit 2443446e62
11 changed files with 215 additions and 70 deletions

View File

@@ -325,7 +325,9 @@ describe "Composer Form Templates", type: :system do
)
expect(find("#{topic_page.post_by_number_selector(1)} .cooked")).to have_css("a.attachment")
expect(find("#{topic_page.post_by_number_selector(1)} .cooked")).to have_css("audio")
expect(find("#{topic_page.post_by_number_selector(1)} .cooked")).to have_css("video")
expect(find("#{topic_page.post_by_number_selector(1)} .cooked")).to have_css(
".video-placeholder-container",
)
end
it "shows labels and descriptions when a form template is assigned to the category" do