ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.53k stars 805 forks source link

Support for "flex-iframe" library #16600

Open falpi opened 3 months ago

falpi commented 3 months ago

Describe the bug

Currently using the "flex-iframe" (https://github.com/flex-users/flex-iframe) library does not appear to be supported. An empty frame remains and no "iframe" element is created even though no errors appear on the browser console. Is it possible that the library will be supported in the future? Browsers should allow an IFrame element to be overlaid on the Canvas element where Ruffle does its rendering.

Expected behavior

Full support of flex-iframe library.

Content Location

https://github.com/flex-users/flex-iframe

Affected platform

Self-hosted version

Operating system

Windows 10

Browser

Firefox 126.0.1

Additional information

No response

Dinnerbone commented 3 months ago

Likely fixed by https://github.com/ruffle-rs/ruffle/pull/16505 but I haven't tested this specific library

falpi commented 3 months ago

@Dinnerbone I tried importing the correct files from your repository but nothing changes : the iframe element is not created even though no error is observed in the browser console. I think it is best to prepare a minimal code example to specifically test the library. As soon as I can find the time I will. Greetings

falpi commented 3 months ago

Hi @Dinnerbone , I created a minimal Flash Builder 4.6 project, with a single "flex-iframe" component that works with a Flash Player runtime while with Ruffle, even with your repository patch, it doesn't work at all: no IFrame is created and no no error is generated in the browser console.

Dinnerbone commented 3 months ago

Thank you for making that; can you please share it so that I can investigate? Thankyou!

falpi commented 3 months ago

Hi, I'm attaching two Flash Builder 4.6 projects: the first produces the "flex-iframe" library while the other uses it in a simple application that opens an IFrame with an embedable site. Inside projects you could find the SWC and SWF precompiled or you can build on you own. example.zip

Below I will paste inline the MXML source of the simple application :


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" 
               xmlns:com="com.google.code.flexiframe.*" >

    <com:IFrame width="50%" height="50%" source="https://www.flightradar24.com/simple"/>

</s:Application>
falpi commented 3 months ago

Hi @Dinnerbone any news ? Have you tried the code above ?

Dinnerbone commented 3 months ago

I can see that it is making the iframe, it's there on the page, it just hasn't been made visible. I'm not sure why that is yet.

falpi commented 3 months ago

I hope you'll be able to figure this out soon, incorporating your fixes into the main branch. Best regards