Arcus92 / instagram-video-control

Adds video playback controls to Instagram.
MIT License
22 stars 1 forks source link

Is it possible to add a configurable default volume? #3

Closed tev-tev closed 9 months ago

tev-tev commented 9 months ago

I'd love for there to be an option to have a default volume for videos via this extension. Videos always start muted for me and I haven't been able to figure out a way to change that. If the extension had a settings page to configure that, that'd be incredible.

Absolutely no idea how much work this would require so no worries if it's not worth it to you. Really love the extension as-is, it's the only one that has consistently worked for me and I appreciate you making it!

Arcus92 commented 9 months ago

Hi, Should be possible to implement. However, there are a few browser restrictions. For example, you are not allowed to auto-play a video with sound. The browser will automatically mute it. You need to manually start the first video on the page in order to play with sound. This could be an issue on the Reals page, but I have to try it out first. That's probably why the original page is muted by default.

I'll let you know if my tests were successful.

Arcus92 commented 9 months ago

@tev-tev I was able to implement this, but I'm not happy with the result.

The volume is saved and the volume is applied when reloading the page. However, the default volume control doesn't show the volume level until you un-mute the video, by clicking the speaker icon: grafik grafik

There is no visual indicator that the last volume is stored. And if you click in the volume bar to un-mute it, you simply set a new volume.

For the time being, I'll implement it this way. To make this feature work properly, I either have to write my own custom player bar, where I have full control over the volume bars visuals - or simply disable auto-play for the first video, so the volume is set, but you have to hit play instead (not a fan of this). Browsers don't allow to set both.