Arcus92 / instagram-video-control

Adds video playback controls to Instagram.
MIT License
24 stars 2 forks source link

(Suggestion) Stop autoplaying videos #43

Open Darkmaster006 opened 2 months ago

Darkmaster006 commented 2 months ago

Is this possible? I would like for videos not to autoplay. Thank you very much for the add-on, it's great.

Arcus92 commented 2 months ago

That would be possible. There is a delay before the extension detects a video. Mainly for performance reasons. With the current implementation all the videos would play for half a second before I can stop them. You may noticed a delay before the control bar appears - it's the same thing. This would feel very clunky and random. I guess this would require a major rewrite to make this clean. I'll check if it is possible.

In Firefox you can disable auto play per site: Click the security lock next to the url -> Secure connection -> More information -> Permission -> Auto play -> Block video and audio. This was more accessible in older Firefox version and I could swear that this option was in Chrome too, but I cannot find it anymore.

Darkmaster006 commented 2 months ago

That would be possible. There is a delay before the extension detects a video. Mainly for performance reasons. With the current implementation all the videos would play for half a second before I can stop them. You may noticed a delay before the control bar appears - it's the same thing. This would feel very clunky and random. I guess this would require a major rewrite to make this clean. I'll check if it is possible.

In Firefox you can disable auto play per site: Click the security lock next to the url -> Secure connection -> More information -> Permission -> Auto play -> Block video and audio. This was more accessible in older Firefox version and I could swear that this option was in Chrome too, but I cannot find it anymore.

Thank you very much for the answer. I have disabled auto-play in Firefox and it works great; still, this feature could be very useful to have for the add-on.

EDIT: I have actually started to have some trouble with the Firefox option in Instagram. Seems like, if you interact with the page, or with a post, all the videos start autoplaying again. No idea why this happens.