# Media player stops playing when you scroll through a topic/thread. Didn't used to do this

**URL:** https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806
**Category:** Support
**Created:** [26 בדצמבר,‏ 2016,‏ 11:58pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806 "2016-12-26T23:58:45Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [26 בדצמבר,‏ 2016,‏ 11:58pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/1 "2016-12-26T23:58:46Z")

</div>

As the title mentions, on my site, if there is a thread with audio uploaded, the built-in player will stop playing if you scroll beyond a certain number of replies. This is a new problem for us. It used to work fine.  
I realize this may seem like a bit of a petty thing, but it’s actually extremely annoying given the nature of our community (audio recording/mixing forum).

To see an example of what is going on, just visit thread and start the audio on the top of the thread and then start going through the replies. At about the 11th reply down from the top, the audio will stop. Also, this is not an isolated problem. Happens on other topics, browsers, devices. As I mentioned, this was not a problem before (maybe the latest update a couple days ago?)

[http://indierecordingdepot.com/t/rock-spill-kit/186](http://indierecordingdepot.com/t/rock-spill-kit/186)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [27 בדצמבר,‏ 2016,‏ 12:27am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/2 "2016-12-27T00:27:51Z")

</div>

Audio from what source? YouTube? Posts get unloaded as they scroll off. I believe YT has a special exception for this that @eviltrout put in a while ago.

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 1:29am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/3 "2016-12-27T01:29:06Z")

</div>

> [@bholst](#):
>
> audio uploaded, the built-in player

Uploaded mp3’s are the source.  
I haven’t tried embedded players from other sites yet (youtube, etc). That’s not as big of a deal to us anyway 😉

It’s the built-in player for mp3’s that are more critical for us.

---

<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: [27 בדצמבר,‏ 2016,‏ 2:39am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/4 "2016-12-27T02:39:31Z")

</div>

Looks like `cloak` is only prevented on [YouTube](https://github.com/discourse/discourse/blob/782b062baa4bf070c42aea354e9f375512e5105c/plugins/lazyYT/assets/javascripts/initializers/lazyYT.js.es6) videos and on [polls](https://github.com/discourse/discourse/blob/f07443b488c048665546fb233615c67b2ea5bbe9/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6#L56).

I believe we would need to listed to play/pause events to handle this properly.

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 4:42am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/5 "2016-12-27T04:42:48Z")

</div>

cloak? I’m not familiar I guess 😕

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 8:07am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/6 "2016-12-27T08:07:35Z")

</div>

Just a quick note…

It appears that the problem is related to the most recent update. I installed another instance and restored a backup and didn’t experience the problem until I updated to the latest version.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [27 בדצמבר,‏ 2016,‏ 8:12am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/7 "2016-12-27T08:12:38Z")

</div>

@eviltrout can have a look in a day or two

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 8:21am UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/8 "2016-12-27T08:21:12Z")

</div>

Thank you! I sure appreciate how responsive you guys are!!!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [27 בדצמבר,‏ 2016,‏ 4:39pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/9 "2016-12-27T16:39:17Z")

</div>

This commit watches to see if an audio clip is played, and if so prevents it from being cloaked:

[https://github.com/discourse/discourse/commit/98eac4924c37161a37da7a5f6cd134bff022b5c4](https://github.com/discourse/discourse/commit/98eac4924c37161a37da7a5f6cd134bff022b5c4)

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 4:56pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/10 "2016-12-27T16:56:00Z")

</div>

> [@eviltrout](#):
>
> This commit watches to see if an audio clip is played, and if so prevents it from being cloaked:

Is this a plugin that I need to install? Just double-checking. I’m still learning!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [27 בדצמבר,‏ 2016,‏ 5:00pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/11 "2016-12-27T17:00:27Z")

</div>

Nope, that commit is in core. As soon as it builds, you should be able to update your Discourse install to use it.

---

<div class="post-metadata">

### Author: ![bholst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bholst/32/65051_2.png) [@bholst](https://meta.discourse.org/u/bholst)
#### Post date: [27 בדצמבר,‏ 2016,‏ 5:12pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/12 "2016-12-27T17:12:18Z")

</div>

> [@eviltrout](#):
>
> Nope, that commit is in core. As soon as it builds, you should be able to update your Discourse install to use it.

So just to clarify, this will be in the next update? (sorry for the newbie questions)

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [27 בדצמבר,‏ 2016,‏ 5:19pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/13 "2016-12-27T17:19:48Z")

</div>

If you are running the `tests-passed` branch which is currently the default, it should be available now in your `/admin/upgrade` interface. If you’re running our `beta` branch it will take a little longer, perhaps in early 2017.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [27 בדצמבר,‏ 2016,‏ 5:23pm UTC](https://meta.discourse.org/t/media-player-stops-playing-when-you-scroll-through-a-topic-thread-didnt-used-to-do-this/54806/14 "2016-12-27T17:23:35Z")

</div>


