Browser ignores video autoplay #182
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected Behavior
Browser doesn't ignore video autoplay
Current Behavior
Browser ignores video autoplay
Steps to Reproduce
Additional information
OBS v24.0.2
macOS 10.14.6
Try starting obs with the command line flag:
--autoplay-policy=no-user-gesture-required
Example on Win64:
obs64.exe --autoplay-policy=no-user-gesture-required
This does not solve the problem for the users. I can run OBS with command line flag as developer widgets.
Any objections to having this flag by default on browser sources? As browser sources aren't designed to be interacted with primarily. Though I worry this may break existing setups.
Ah, you're right. I'm blind! Closing.
Actually, as this issue was created after the flag was added, I'm leaving this open for now.
I can confirm the issue -- Same OBS and MacOS version as original poster. As a test, I reverted to OBS 23.2.1, and the autoplay seemed to work. I was, however, unable to get it to work using the
--autoplay-policy=no-user-gesture-requiredflags on OBS 24.0.2I'd like to bump this again at this point saying I do have this issue as well. I'm on Arch Linux running OBS 25.0.7.r372 from git. On this same laptop, the video in question plays just fine on windows, however it does not play on Linux and seems to almost be transparent. On linux this is using CEF minimal version 3770.
I am also not having any luck getting videos on browser web sources to autoplay. Help please?
The file in the initial comment is no longer available. Can someone else provide a reproducible test case?
The steps for this issue should be reproduceable with this Download
The only difference will be step 6 where you'll be browsing to
widget.htmlinstead ofwidget/index.htmlSince #282 reported this on Windows, and I missed that this was originally reported on macOS, I tested this on Windows. After some investigation, I believe this is related to hardware acceleration.
When I add this file as a browser source in OBS Studio 26.1.1 64-bit on Windows 10, the video autoplays for me instantly without interacting. However, the video does seem to struggle to play smoothly in 27.0.0-rc1 unless you're interacting with the source. When interacting, the video plays smoothly. When not interacting, it sometimes plays a few frames here and there. It works fine when I rebuild 27.0.0-rc1 with shared textures enabled.
Sure enough, if I uncheck "Enable Browser Source Hardware Acceleration" in OBS Settings in 26.1.1, the issue appears.
We didn't enable hardware acceleration for browser sources on macOS until OBS Studio 26.1.2. We believe that recent reports regarding seeing this behavior on 27.0.0-rc1 are due to a misconfiguration in that release that disabled hardware acceleration, and that will be fixed in future releases.
This behavior should go away if testing on macOS with OBS Studio 26.1.2 or OBS Studio 27.0.0-rc2 whenever that is released.
It looks like while this and #282 exhibit the same behavior and they share the same underlying cause (disabled hardware acceleration), the immediate cause of each Issue is slightly different.
This issue was because hardware acceleration for browser sources was not enabled on macOS until OBS Studio 26.1.2. This issue was reported against OBS Studio 24.0.2 on macOS, so hardware acceleration was not available. This specific issue should be resolved as of OBS Studio 26.1.2.
#282 was reported against OBS Studio 27.0.0-rc1 on Windows 10. Due to a configuration error during the build process, 27.0.0-rc1 was built without hardware acceleration support for the browser source. That specific issue should be resolved with OBS Studio 27.0.0-rc2 when that is released.
With that said, I'm going to close this issue since it should have been fixed in OBS Studio 26.1.2. I'm going to reopen #282 and target it to be fixed in OBS Studio 27.0.0-rc2. Sorry for the trouble with shifting issues around, and sorry for the noise.