diff --git a/app/assets/javascripts/discourse/app/instance-initializers/video-placeholder.js b/app/assets/javascripts/discourse/app/instance-initializers/video-placeholder.js index 7af69498c90..1d0162b27d9 100644 --- a/app/assets/javascripts/discourse/app/instance-initializers/video-placeholder.js +++ b/app/assets/javascripts/discourse/app/instance-initializers/video-placeholder.js @@ -1,3 +1,4 @@ +import { spinnerHTML } from "discourse/helpers/loading-spinner"; import { withPluginApi } from "discourse/lib/plugin-api"; import { iconHTML } from "discourse-common/lib/icon-library"; import discourseLater from "discourse-common/lib/later"; @@ -9,6 +10,11 @@ export default { function handleVideoPlaceholderClick(helper, event) { const parentDiv = event.target.closest(".video-placeholder-container"); const wrapper = parentDiv.querySelector(".video-placeholder-wrapper"); + const overlay = wrapper.querySelector(".video-placeholder-overlay"); + + parentDiv.style.cursor = ""; + parentDiv.removeEventListener("click", handleVideoPlaceholderClick); + overlay.innerHTML = spinnerHTML; const videoHTML = `