Ionic 4 camera preview is showing white background

I am using ionic camera preview. But I can only see a white background like shown in the foto. Does someone have an idea to solve this.

I already tried to do scss

ion-content,body, .app-root, ion-split-pane, ion-app,.scroll-content,.fixed-content,page-app {
–background: none transparent !important;
}

I am using ionic camera preview. But I can only see a white background like shown in the foto. Does someone have an idea to solve this.

I already tried to do scss

ion-content,body, .app-root, ion-split-pane, ion-app,.scroll-content,.fixed-content,page-app {
    --background: none transparent !important;
}

and tried to solve the issue with z-index, but did not succeed.

What I see is this:

These are my camera options:

  const cameraPreviewOpts: CameraPreviewOptions = {
    x: 0,
    y: 0,
    width: window.screen.width,
    height: window.screen.height,
    camera: 'rear',
    tapPhoto: true,
    previewDrag: false,
    toBack: true,
    alpha: 1
  }

Can anyone help?

This is what I use and it works fine for me:

html, body,  ion-app, ion-content, ion-page, .nav-decor {
  --background: transparent;
}

Hope it helps someone.