mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-11-03 18:43:22 +00:00 
			
		
		
		
	GUAC-1305: Implement detection of browser WebP support and add new image mimetype to handshake which will include any non-standard image encodings supported.
This commit is contained in:
		@@ -183,6 +183,13 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
 | 
			
		||||
                    info.getVideoMimetypes().toArray(new String[0])
 | 
			
		||||
                ));
 | 
			
		||||
 | 
			
		||||
        // Send supported image formats
 | 
			
		||||
        writer.writeInstruction(
 | 
			
		||||
                new GuacamoleInstruction(
 | 
			
		||||
                    "image",
 | 
			
		||||
                    info.getImageMimetypes().toArray(new String[0])
 | 
			
		||||
                ));
 | 
			
		||||
 | 
			
		||||
        // Send args
 | 
			
		||||
        writer.writeInstruction(new GuacamoleInstruction("connect", arg_values));
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,10 +55,15 @@ public class GuacamoleClientInformation {
 | 
			
		||||
    private final List<String> audioMimetypes = new ArrayList<String>();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The list of audio mimetypes reported by the client to be supported.
 | 
			
		||||
     * The list of video mimetypes reported by the client to be supported.
 | 
			
		||||
     */
 | 
			
		||||
    private final List<String> videoMimetypes = new ArrayList<String>();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The list of image mimetypes reported by the client to be supported.
 | 
			
		||||
     */
 | 
			
		||||
    private final List<String> imageMimetypes = new ArrayList<String>();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the optimal screen width requested by the client, in pixels.
 | 
			
		||||
     * @return The optimal screen width requested by the client, in pixels.
 | 
			
		||||
@@ -133,4 +138,15 @@ public class GuacamoleClientInformation {
 | 
			
		||||
        return videoMimetypes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the list of image mimetypes supported by the client. To add or
 | 
			
		||||
     * removed supported mimetypes, the list returned by this function can be
 | 
			
		||||
     * modified.
 | 
			
		||||
     *
 | 
			
		||||
     * @return The set of video mimetypes supported by the client.
 | 
			
		||||
     */
 | 
			
		||||
    public List<String> getImageMimetypes() {
 | 
			
		||||
        return imageMimetypes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user