Skip to content

Commit fdedcdf

Browse files
committed
[FIX] html_editor: show sample video in media dialog
1 parent 714f491 commit fdedcdf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

addons/html_editor/static/src/main/media/media_plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ export class MediaPlugin extends Plugin {
174174
extraTabs: this.getResource("media_dialog_extra_tabs").filter(
175175
(tab) => !(tab.id === "DOCUMENTS" && params.noDocuments)
176176
),
177+
vimeoPreviewIds: ["528686125", "430330731", "509869821", "397142251", "763851966", "486931161",
178+
"499761556", "392935303", "728584384", "865314310", "511727912", "466830211"],
177179
...this.config.mediaModalParams,
178180
...params,
179181
});

addons/website/static/tests/builder/videos.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import { expect, test } from "@odoo/hoot";
22
import { animationFrame, dblclick } from "@odoo/hoot-dom";
33
import { defineWebsiteModels, setupWebsiteBuilder } from "./website_helpers";
4+
import { onRpc } from "@web/../tests/web_test_helpers";
45

56
defineWebsiteModels();
67

78
test("double click on video", async () => {
9+
onRpc("/api/oembed.json", async () => ({
10+
// Those lead to 404 but it's fine for the test
11+
thumbnailSrc: "/hello/world.jpg",
12+
}));
813
await setupWebsiteBuilder(`
914
<div>
1015
<div class="media_iframe_video o_snippet_drop_in_only">

0 commit comments

Comments
 (0)