Browser ignores video autoplay #182

Closed
opened 2019-11-22 08:16:24 -06:00 by ghost · 12 comments
ghost commented 2019-11-22 08:16:24 -06:00 (Migrated from github.com)

Expected Behavior

Browser doesn't ignore video autoplay

Current Behavior

Browser ignores video autoplay

Steps to Reproduce

  1. Download and unzip archive widget.zip
  2. Open OBS
  3. Click on "Plus" in sources and select "Browser"
  4. Click "OK"
  5. Set checkbox "Local file"
  6. Browse our widget (widget/index.html)
  7. Click "OK"

Additional information

OBS v24.0.2
macOS 10.14.6

## Expected Behavior Browser doesn't ignore video autoplay ## Current Behavior Browser ignores video autoplay ## Steps to Reproduce 1. [Download](https://drive.google.com/file/d/1Sa_3G16kOd8FtyUB6qfcsUHuxajEsZex/view?usp=sharing) and unzip archive widget.zip 2. Open OBS 3. Click on "Plus" in sources and select "Browser" 4. Click "OK" 5. Set checkbox "Local file" 6. Browse our widget (widget/index.html) 7. Click "OK" ## Additional information OBS v24.0.2 macOS 10.14.6
phillipseamore commented 2019-11-22 15:47:11 -06:00 (Migrated from github.com)

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

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
ghost commented 2019-12-14 09:36:09 -06:00 (Migrated from github.com)

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.

> 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.
WizardCM commented 2019-12-27 17:37:05 -06:00 (Migrated from github.com)

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.

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.
WizardCM commented 2019-12-27 17:40:23 -06:00 (Migrated from github.com)

Ah, you're right. I'm blind! Closing.

Ah, you're right. I'm blind! Closing.
WizardCM commented 2019-12-27 17:43:08 -06:00 (Migrated from github.com)

Actually, as this issue was created after the flag was added, I'm leaving this open for now.

Actually, as this issue was created after the flag was added, I'm leaving this open for now.
MattBroach commented 2020-01-03 14:30:53 -06:00 (Migrated from github.com)

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-required flags on OBS 24.0.2

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-required` flags on OBS 24.0.2
devyntk commented 2020-07-11 17:38:02 -05:00 (Migrated from github.com)

I'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'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.
MorningStarGG commented 2021-02-03 11:34:07 -06:00 (Migrated from github.com)

I am also not having any luck getting videos on browser web sources to autoplay. Help please?

I am also not having any luck getting videos on browser web sources to autoplay. Help please?
RytoEX commented 2021-04-03 11:53:29 -05:00 (Migrated from github.com)

The file in the initial comment is no longer available. Can someone else provide a reproducible test case?

The file in the initial comment is no longer available. Can someone else provide a reproducible test case?
MadWolfDynamite commented 2021-04-03 12:59:57 -05:00 (Migrated from github.com)

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.html instead of widget/index.html

The steps for this issue should be reproduceable with this [Download](https://drive.google.com/file/d/1_6gDFdP8i3xFjts4DNJ8At_PDZzc-Im-/view?usp=sharing) The only difference will be step 6 where you'll be browsing to `widget.html` instead of `widget/index.html`
RytoEX commented 2021-04-05 20:07:24 -05:00 (Migrated from github.com)

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.html instead of widget/index.html

Since #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.

> > > The steps for this issue should be reproduceable with this [Download](https://drive.google.com/file/d/1_6gDFdP8i3xFjts4DNJ8At_PDZzc-Im-/view?usp=sharing) > The only difference will be step 6 where you'll be browsing to `widget.html` instead of `widget/index.html` Since #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.
RytoEX commented 2021-04-10 20:58:19 -05:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser#182
No description provided.