ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

https://z0r.de/1703 is not working

Open Diatonator opened this issue 2 years ago • 0 comments

Describe the bug

https://z0r.de/1703 just shows a grey screen. As per discussion in https://github.com/ruffle-rs/ruffle/issues/720, this loop has been working sometime, but now it's not. F12 shows nothing Nightly 2022-07-31

image

Expected behavior

Sound and visuals, not a still grey screen

Affected platform

Browser's extension

Operating system

Windows 10

Browser

Chrome 103.0.5060.134

Additional information

No response

Diatonator avatar Aug 01 '22 18:08 Diatonator

This one seems to not work yet on Nightly 2022-08-24

Diatonator avatar Aug 24 '22 17:08 Diatonator

The problem seems to be not in that SWF is not working at all, but you have to manually press Play button for it to play! In Adobe this SWF plays automatically.

Diatonator avatar Aug 29 '22 15:08 Diatonator

you have to manually press Play button for it to play!

Ah, you mean in the context menu. Yeah. Interesting...

torokati44 avatar Aug 29 '22 19:08 torokati44

I've done some investigation. The SWF has a preloader that checks if the movie had loaded in two places:

  • In a frame script on frame 1
  • In a ProgressEvent

The event listener check works correctly, but the frame script check is broken. Specifically it does not actually play the movie, instead it does this:

function frame1() {
    // (add the progress event listener...)
    this.percent = /* (calculate a percentage...) */
    if (this.percent == 100) { //For those wondering, this check passes in Ruffle.
        nextFrame();
    }
    stop();
}

This is incorrect. If the movie loads faster than the first frame, then we move to frame 2 but still stop the movie. This never is a problem on Flash Player because it always loads movies asynchronously, so frame1 never sees a loaded movie and the correct check in the event handler runs instead.

We could work around this issue by deliberately waiting a frame before triggering progress events.

kmeisthax avatar Aug 29 '22 21:08 kmeisthax