     }
     
     @objc open func toggleFullscreenButton() {
-        if isOnFullscreen {
-            core?.trigger(InternalEvent.userRequestExitFullscreen.rawValue)
-        } else {
-            core?.trigger(InternalEvent.userRequestEnterInFullscreen.rawValue)
-        }
+        let event: InternalEvent = isOnFullscreen ? .userRequestExitFullscreen : .userRequestEnterInFullscreen
+        core?.trigger(event.rawValue)
     }
 }

    open var fullscreenIcon = UIImage.fromName("fullscreen", for: FullscreenButton.self)
    open var windowedIcon = UIImage.fromName("fullscreen_exit", for: FullscreenButton.self)
    
    var button: UIButton! {
        didSet {
            button.accessibilityIdentifier = "FullscreenButton"
            

        }
    }
    
    open var isOnFullscreen = false {
        didSet {
            let icon = isOnFullscreen ? windowedIcon : fullscreenIcon
            button.setImage(icon, for: .normal)
