Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Fullscreen

3 sites No security coverage
View on drupal.org

This module integrates a lightweight JavaScript library to enable fullscreen display for any HTML element on your website. It automatically provides a fallback from a local installation to a CDN if the library is not found, requiring no configuration to start using.

Integrates FullscreenX.js, a zero-dependency, promise-based fullscreen library for modern browsers. Provides automatic CDN fallback when library isn't installed locally. Works with any HTML element.

Features

Basic Functionality:

  • Seamlessly integrates FullscreenX.js library into Drupal
  • Automatic detection and loading of local or CDN-hosted library
  • Zero configuration required for basic usage
  • Cross-browser fullscreen API with vendor prefix auto-detection

Unique Features:

  • Dual loading strategy: Automatically falls back to CDN (jsDelivr) if local library is not found
  • Promise-based API: Modern async/await support for all fullscreen operations
  • Smart element targeting: Use CSS selectors or DOM elements directly
  • Event system: Listen to fullscreen state changes (enter, exit, change, error)
  • Tiny footprint: Only 2.2KB minified library size
  • TypeScript support: Full type definitions for enhanced development experience

Use Cases:

  • Video players requiring fullscreen playback
  • Image galleries and lightboxes
  • Presentations and slideshows
  • Interactive dashboards and data visualizations
  • Gaming interfaces
  • Document viewers and readers
  • Any content that benefits from distraction-free viewing

Post-Installation

Once installed and enabled, the module automatically loads FullscreenX.js on all pages. No configuration required!

Basic Usage:

  1. The library is immediately available as FullscreenX global object
  2. Add fullscreen functionality to your custom JavaScript:
// Enter fullscreen
FullscreenX.request('#my-element');

// Exit fullscreen
FullscreenX.exit();

// Toggle fullscreen
FullscreenX.toggle('#video-player');

// Listen to events
FullscreenX.on('enter', () => console.log('Entered fullscreen'));
FullscreenX.on('exit', () => console.log('Exited fullscreen'));

Integration Points:

  • Custom module JavaScript files
  • Theme JavaScript files
  • Inline scripts (not recommended)
  • Drupal behaviors for AJAX compatibility

No Configuration Pages: This module works out-of-the-box with zero configuration. Simply enable and start using the FullscreenX API in your JavaScript code.

Optional but Recommended:

  • FullscreenX.js library (v1.0.0) installed locally at /libraries/FullscreenX/dist/fullscreenx.min.js
  • Download from: GitHub Release v1.0.0

If the library is not installed locally, the module automatically loads it from jsDelivr CDN.

  • Libraries API: Provides a common repository for external libraries
  • Advanced CSS/JS Aggregation: Optimizes loading of JavaScript assets
  • Video Embed Field: Works great with fullscreen for embedded videos
  • Colorbox: Can be enhanced with fullscreen capabilities
  • Photoswipe: Gallery module that can benefit from fullscreen integration

What differentiates Fullscreen module:

  • Zero dependencies (no jQuery required)
  • Smallest footprint (3.70KB)
  • Automatic CDN fallback
  • Promise-based modern API
  • TypeScript support out of the box

Supporting this Module

Ways to contribute:

Community Documentation

Quick Start Example

// Basic implementation in Drupal
(function (Drupal, FullscreenX) {
  'use strict';
  
  Drupal.behaviors.myFullscreen = {
    attach: function (context, settings) {
      // Make all videos fullscreen-capable
      once('fullscreen-video', '.video-wrapper', context).forEach(function(element) {
        element.addEventListener('dblclick', function() {
          FullscreenX.toggle(element);
        });
      });
    }
  };
})(Drupal, FullscreenX);

Browser Support Matrix

Browser Minimum Version Support Level Chrome 71+ Full Support Firefox 64+ Full Support Safari 12.1+ Limited Options Edge 79+ Full Support Opera 58+ Full Support

Activity

Total releases
2
First release
Sep 2025
Latest release
10 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0 Stable Sep 10, 2025
1.0.x-dev Dev Sep 10, 2025