instagram-video-control
instagram-video-control copied to clipboard
Reels randomly getting muted
I am scrolling through instagram reels but it randomly mutes them. I tried to find a pattern but no success yet. I scroll both with "down arrow" and "mouse scroll-wheel", idk if that has anything to do with this. Sometimes audio plays for 2-3 seconds and then mutes and sometimes fully muted from start.
I am on Chromium / Ubuntu 22.04.
I was able to reproduce it in Firefox when scrolling down fast while the Reels are loading. But it is not consistent. Once you scroll to a new Reel I sometimes receive a mute event by Instagram. I guess since we never enable audio using the Instagram UI, Instagram thinks all videos should be muted on start. When the extension receives an audio change it assumes it comes from the user and stores these values for all upcoming videos.
There is a workaround for this already in place: After a video was started the extension ignores all volume changes for 10ms. However, this is very janky and won't work every time. I'll try to implement a better solution.
What about manually enabling audio by clicking on the Instagram reels UI audio button every time a reel loads using
const audioBtn = document.querySelector("svg[aria-label='Audio is muted']");
// this will be null if audio is unmuted
if(audioBtn) audioBtn.parentElement.click()
So, the suggestion is to unmute every time a reel loads instead of a delay. What do you say about this approach? 😶
I was avoiding finding the button via label texts, since they depend on your Instagram / Browser language. But I run some tests with this. I'm currently trying to figure out why this only happens some times.
Spend the last two days debugging compiled React code and scrolling through an endless stream of Reels. While losing my brain capacity in the process, I discovered a way to communicate with the React components. But it is super complicated.
Instead of doing this now, I'll commit a quick workaround to release a fix soon: #34
Spend the last two days debugging compiled React code and scrolling through an endless stream of Reels. While losing my brain capacity in the process, I discovered a way to communicate with the React components. But it is super complicated.
Instead of doing this now, I'll commit a quick workaround to release a fix soon: #34
I appreciate the effort. Fr, debugging would include watching hundreds of reels cause there was no pattern lol. Also, Communicating with react components? So basically you can now have more control over Instagram or other react app cause you can communicate with other components also in the app. I will check the commit out of curiosity 🙂. We learn something new everyday after all.
Again, Thanks for the hard work. 👍