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.

Video Flicker when streaming image blobs

See original GitHub issue

When running from live, each frame is passed as an image blob. After digging into the code I noticed the image-sequence.js class never has the image data loaded (because the browser needs to load it).
So essentially what happens is componentWillReceiveProps sets state from _getCurrentFrames . This kicks off the image load promise, but returns currentFrameImage as undefined. The image subsequently is removed, then the promise callback fires and sets the new frame into state.

One potential fix for this would be to not remove the image but rather just not change the currentFrameImage if it hasn’t loaded yet.

  _getCurrentFrames(props) {
    const {currentTime, src} = props;
    const {currentFrameImage} = this.state || {}

    const currentFrame = this._buffer.set(src, currentTime);
    const currentFrameData = this._buffer.get(currentFrame);

    if (currentFrameData && !currentFrameData.image) {
      currentFrameData.promise.then(image => {
        if (this.state.currentFrame === currentFrame) {
          this.setState({currentFrameImage: image});
        }
      });
    }

    return {
      currentFrameImage: (currentFrameData && currentFrameData.image) || currentFrameImage,
      currentFrame
    };
  }

I’m happy to make a PR if this is unintended behavior / a bug. If its not can you explain how I should stream image blobs from live data?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Pessimistresscommented, May 7, 2019

Fix is published in 1.0.0-beta.10.

3reactions
jruddellcommented, May 6, 2019

@MGraefe Great thanks! When will this be released (so I can pull down in NPM)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video Flicker when streaming image blobs · Issue #299 - GitHub
When running from live, each frame is passed as an image blob. After digging into the code I noticed the image-sequence.js class never...
Read more >
MediaRecorder video blob has blinking when recording both ...
When using MediaRecorder to record a stream of both video and audio, the resulting video blob contains glitches (it's blinking).
Read more >
Streaming issues (stuttering, black flashes) - TL.net
The black flicker is due to fullscreen. If you want to play under fullscreen you indeed need to use fullscreen (windowed). WestTyrant is...
Read more >
Video Glitch on Amazon Prime Video When Resolution Adjusts
294.1, when streaming video on Amazon Prime in full screen mode, the screen flickers to black and then back to the picture as...
Read more >
While watching videos on Google Chrome, my screen flickers ...
I had a problem with videos in Google Chrome, looking like “ripple effect”, and tried two things: * Turning off hardware acceleration setting...
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