ruffle-rs / ruffle

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

Web Config Options Not Working #18607

Closed JamesAllgood closed 2 hours ago

JamesAllgood commented 3 hours ago

Im trying to remove the debug option on my website where we host ruffle

I've told the code not to show the context menu and hide it all.

I've got the following options configured but the right click menu still shows?

Ignore the output at the start

Image

        $output .= "window.RufflePlayer.config = {";
        $output .= "    'publicPath': '/ruffle',";
        $output .= "    'polyfills': 'true',";
        $output .= "    'autoplay': 'on',"; 
        $output .= "    'unmuteOverlay': 'hidden',";
        $output .= "    'contextMenu': 'Off',"; 
        $output .= "    'showSwfDownload': 'false',";   
        $output .= "    'preloader': 'false',";         
        $output .= "    'quality': 'low',"; 
        $output .= "    'splashScreen': 'false',";  
        $output .= "}";
Toad06 commented 2 hours ago

This should work better:

        $output .= "window.RufflePlayer.config = {";
        $output .= "    'publicPath': '/ruffle',";
        $output .= "    'polyfills': true,";
        $output .= "    'autoplay': 'on',"; 
        $output .= "    'unmuteOverlay': 'hidden',";
        $output .= "    'contextMenu': 'off',"; 
        $output .= "    'showSwfDownload': false,"; 
        $output .= "    'preloader': false,";           
        $output .= "    'quality': 'low',"; 
        $output .= "    'splashScreen': false,";    
        $output .= "}";
JamesAllgood commented 2 hours ago

much better thanks! Didn't know some bits needed quotes to work properly.