# Is there a way to embed media players (audio/video) inside a table?

**URL:** https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115
**Category:** Support
**Created:** [November 22, 2019, 8:07am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115 "2019-11-22T08:07:22Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [November 22, 2019, 8:07am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/1 "2019-11-22T08:07:22Z")

</div>

I’m wondering if there is a way to organize media files into some sort of table. This is my current approach:

Test 1:

[https://global.discourse-cdn.com/meta/original/3X/7/0/708f6edd45a9b839b23ae96f22ca5b91d196af98.mp4](https://global.discourse-cdn.com/meta/original/3X/7/0/708f6edd45a9b839b23ae96f22ca5b91d196af98.mp4)

Test 2:

[https://global.discourse-cdn.com/meta/original/3X/c/2/c2eb2a1846afccb66b0f6b2e9d716c7a976f3e45.mp4](https://global.discourse-cdn.com/meta/original/3X/c/2/c2eb2a1846afccb66b0f6b2e9d716c7a976f3e45.mp4)

Test 3:

[https://global.discourse-cdn.com/meta/original/3X/7/5/75ecd9b0d3d699cff10cc351e47c4e5b74d83951.mp4](https://global.discourse-cdn.com/meta/original/3X/7/5/75ecd9b0d3d699cff10cc351e47c4e5b74d83951.mp4)

But I’d like to be able to do something like this (with the players embedded instead of the URL):

| number | test |
| --- | --- |
| 1 | [https://global.discourse-cdn.com/meta/original/3X/7/0/708f6edd45a9b839b23ae96f22ca5b91d196af98.mp4](https://global.discourse-cdn.com/meta/original/3X/7/0/708f6edd45a9b839b23ae96f22ca5b91d196af98.mp4) |
| 2 | [https://global.discourse-cdn.com/meta/original/3X/c/2/c2eb2a1846afccb66b0f6b2e9d716c7a976f3e45.mp4](https://global.discourse-cdn.com/meta/original/3X/c/2/c2eb2a1846afccb66b0f6b2e9d716c7a976f3e45.mp4) |
| 3 | [https://global.discourse-cdn.com/meta/original/3X/7/5/75ecd9b0d3d699cff10cc351e47c4e5b74d83951.mp4](https://global.discourse-cdn.com/meta/original/3X/7/5/75ecd9b0d3d699cff10cc351e47c4e5b74d83951.mp4) |

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 25, 2019, 1:06am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/2 "2019-11-25T01:06:40Z")

</div>

oh, this is going to be tricky, this is essentially asking for a way to force a “full onebox” somewhere on a link that is not at the beginning of a line. I think in very rare conditions like what you have here this may be useful.

I kind of support a change that would allow something like this for the ultra ninja cases where you want to force a onebox in the middle of a line:

`<a href="onebox_url" type=onebox>...</a>`

Trouble is all our onebox styling atm assumes it is the only thing in the line and gets full width so a bunch of assumptions would need to be changed.

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [November 25, 2019, 5:37am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/3 "2019-11-25T05:37:58Z")

</div>

> [@sam](#):
>
> I kind of support a change that would allow something like this for the ultra ninja cases where you want to force a onebox in the middle of a line

This would also be useful for when you want to show oneboxes inside of a details section.

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [November 25, 2019, 7:46am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/4 "2019-11-25T07:46:08Z")

</div>

I don’t know if this would help, but an alternative interface could be to extend the BBCode syntax. Something like:

```
[audio src="https://file.m4a"][/audio]

```

Or even:

```
[inline_onebox]https://file.m4a[/inline_onebox]

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 25, 2019, 3:01pm UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/5 "2019-11-25T15:01:31Z")

</div>

Or can we just whitelist the audio video and source tags? Today it’s impossible to post a video to Discourse with multiple sources (one mp4 and one webm) so it plays on every device.

---

<div class="post-metadata">

### Author: ![anon48433008](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anon48433008](https://meta.discourse.org/u/anon48433008)
#### Post date: [November 25, 2019, 7:42pm UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/6 "2019-11-25T19:42:59Z")

</div>

Have you considered to allow Iframes and post the table elsewhere?

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [February 16, 2020, 5:57am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/7 "2020-02-16T05:57:07Z")

</div>

@martin Thanks to your [awesome PR](https://github.com/discourse/discourse/pull/8760), audio links now work even if there are characters to the left of the URL! 🎉 (many of my users struggled with this detail, so it will be much easier for them).

I noticed that now audio files work inside **details** :

> **Example**
>

I was hoping that they would also work inside markdown tables, but I see that this doesn’t yet work:

| name | audio file goes here |
| --- | --- |
| example | ![New Recording 23 |

I thought the problem might be the pipe character `|`, but it also doesn’t work with HTML tables:

| name | audio file goes here |
| --- | --- |
| example | ![New Recording 23|video](upload://g3KMoFLMKmekLPcoBovHQCD71eU.mp4) |

Is this a feature that could be included in a future release?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 17, 2020, 12:35am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/8 "2020-02-17T00:35:48Z")

</div>

Markdown tables work, but you need to escape the `|` with \ eg `\|` it’s a slightly annoying issue with pipes cause md tables have semantics for it pipes already

I am half open to adding another optional char we can use there as a split. Comma is not ideal cause people can use it for descriptions.

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [February 17, 2020, 5:32am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/9 "2020-02-17T05:32:49Z")

</div>

This is a pretty good workaround for now. Thanks for pointing it out!

The only issue I’ve run into has been 429 errors (too many requests) when I try to edit a medium-sized table with several audio files (actually, the same one repeated). I got a discourse modal when I tried to save changes and this was in the console:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/5/75b610344771da586f1323f7ec99cdc1c6d95e2a.png)

The only thing I did was add three rows to this table:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/4/74653477445ee4d8563954af4286ec4bdec2efc5.png)

I don’t know if this is the expected behaviour or if there is a way to lazy-load the resources to avoid the error (I was able to do it after several retries).

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 18, 2020, 5:04am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/10 "2020-02-18T05:04:08Z")

</div>

Hmmm I am curious, if we currently put a 40mb MP3 in a page are browsers downloading all of it prior to play?

A lazy loader certainly makes sense if we currently have this going on, only thing we would miss out is duration, but we could figure that out on the server.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 16, 2024, 5:50am UTC](https://meta.discourse.org/t/is-there-a-way-to-embed-media-players-audio-video-inside-a-table/134115/11 "2024-01-16T05:50:58Z")

</div>


