Webview is broken when I load another page


#1

I have two buttons. Each one has a link for a youtube video. If I do not click on the video to play it after it appears in the webview, I can change the src of webview by clicking on another button and I can see the image of the other video appears in the window. But if I click on either one and play the video, when I try to click on another button to see the another video, the webview is broken and all black and do not show me the video.

I tried too reload the window on standard menu of Electron, and the window is blank. Same behavior only If I play one video. How can I fix it?

[Video showing the error]

If you want to reproduce this behavior and check the code, here’s the repository on github:


#2

Hi Dalton,

I don’t know if anyone else has tried, but I can’t seem to recreate any of the behaviour you are reporting (It works fine for me). Can I ask what version of Electron you are using?


#3

Hi GooBall.

I tested on Windows now and it works, but on Ubuntu the strange behavior happens.

Electron version: 1.2.2
Operating system: Ubuntu 16.04


#4

@GooBall


#5

Hi,

this issue is related to GPU compositing and is triggered when a element is loaded/shown on a page rendered inside an Electron webview.

The problem can be avoided, by disabling GPU compositing:

app.commandLine.appendSwitch('disable-gpu-compositing');

Happens for me on Ubuntu 14.04.5 with an AMD GPU. You can easily see if GPU compositing is enabled by opening up chrome://gpu/ in Electron or as comparison in Chrome/Chromium.


Electron goes blank when audio element src attribute has changed in a React component and the window reloads on linux
#6

you save my life :slight_smile i have a similar prob in linux
https://stackoverflow.com/questions/46139637/electron-goes-blank-when-audio-element-src-attribute-has-changed-in-a-react-comp

with this command its ok :slight_smile: