mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -48,7 +48,7 @@ RSpec.describe "hotlinked media blocking" do
|
||||
post = Fabricate(:post, raw: "")
|
||||
expect(post.cooked).not_to have_tag("video source[src]")
|
||||
expect(post.cooked).to have_tag(
|
||||
"video source",
|
||||
"div",
|
||||
with: {
|
||||
PrettyText::BLOCKED_HOTLINKED_SRC_ATTR => hotlinked_url,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user