question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transparent player, why is alpha set false, with no override

See original GitHub issue

I would like to play an alpha video on a background, but the VideoContext webglContextAttributes alpha Can’t be overriden because it is copied last.

Why is this done? If I change it to true works as expected, giving transparent player.

=====================================

`_classCallCheck(this, VideoContext);

            this._canvas = canvas;
            this._endOnLastSourceEnd = endOnLastSourceEnd;

            this._gl = canvas.getContext("experimental-webgl", Object.assign({ preserveDrawingBuffer: true }, // can be overriden
            webglContextAttributes, { alpha: false // Can't be overriden because it is copied last
            }));`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gsouquetcommented, Apr 23, 2019

I remember seeing a comment from Matthew in the code

if (webglContextAttributes.alpha === true){
  console.error("webglContextAttributes.alpha must be false for correct opeation");
}

I assume it has to do with performance as you said but possible with fidelity of the output. With new APIs like MediaRecorder you could end up with a different output than what you have previewed in your browser.

This would need to be investigated a bit more. I think the default has to be alpha: false for sure. But I can’t see major problems that would arise with letting developers override that

0reactions
gsouquetcommented, Nov 7, 2019

@icyield I believe I didn’t explain myself correctly. We could probably allow an alpha override. However if we are going to allow that I believe we should think about how we can communicate the limitations this brings with the desynchronised rendering.

Maybe through documentation or maybe make the library check if anything is stacked above the canvas. Not sure

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alpha is not transparent - Unity Forum
When I set Alpha is Transparent to true, the transparent areas ... By default the alpha has no direct effect on the other...
Read more >
Setting alpha on UIView sets the alpha on its subviews which ...
The value of this property is a floating-point number in the range 0.0 to 1.0, where 0.0 represents totally transparent and 1.0 represents ......
Read more >
Fixing Alpha Embedded Textures in Unreal Engine - YouTube
Udate!As pointed out by Muhammed Basil" It is not an issue... UE use Different method for loading alpha... More technical way(If I may)....
Read more >
change "Save color values from transparent pixels" defaults to ...
change "Save color values from transparent pixels" defaults to FALSE for PNG, TIFF. When you save the image to a format that supports...
Read more >
Video transparency support - Unity - Manual
The lowest alpha value means an image is fully transparent (not visible at all), while the highest alpha value means it is fully...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found