Skip to main content

Pannellum 360 video player integration

Project description

Whitebox Plugin - Pannellum

This is a plugin for whitebox that provides Pannellum 360 video player integration.

Installation

Install the plugin to whitebox:

poetry add whitebox-plugin-pannellum

Features

360 Video Playback

The Pannellum360Video React component wraps Video.js with Pannellum for equirectangular 360-degree video rendering.

import { Pannellum360Video } from 'whitebox-plugin-pannellum';

<Pannellum360Video
  options={{
    sources: [{ src: '/video.mp4', type: 'video/mp4' }],
    pannellum: {
      autoRotate: -2,
      hfov: 120,
    }
  }}
  onReady={(player) => console.log('Player ready')}
/>

WebRTC Live Streaming Support

The component supports both regular video URLs and WebRTC streams (via srcObject):

Source Type Detection Initialization
URL (src) !srcObject videojs-pannellum plugin
WebRTC (srcObject) !!srcObject Direct Pannellum init

For WebRTC sources, the component:

  1. Waits for video frames using requestVideoFrameCallback (with polling fallback)
  2. Initializes Pannellum directly with the video element as a WebGL texture
  3. Handles play/pause synchronization with the Pannellum viewer

See whitebox-plugin-videojs README for the full WebRTC/WHEP architecture documentation.

Frame Detection

The waitForVideoFrame() utility ensures Pannellum only initializes after actual video data is available:

// Uses requestVideoFrameCallback when available (Chrome 83+, Firefox 130+)
// Falls back to polling videoWidth/videoHeight for Safari
await waitForVideoFrame(videoEl, maxWaitMs);

This prevents the "black sphere" issue common with WebRTC streams where metadata arrives before video frames.

Additional Instructions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whitebox_plugin_pannellum-0.1.7.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whitebox_plugin_pannellum-0.1.7-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file whitebox_plugin_pannellum-0.1.7.tar.gz.

File metadata

  • Download URL: whitebox_plugin_pannellum-0.1.7.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0.dev0 CPython/3.14.4 Linux/6.1.75+

File hashes

Hashes for whitebox_plugin_pannellum-0.1.7.tar.gz
Algorithm Hash digest
SHA256 92176be935bc70262ddec9c3f2b474d310c006c9af52b0b137c335cbf966660f
MD5 320a04c130634c85e66fa6b946ea276c
BLAKE2b-256 9ac5772b372eab6f10a8056b64b2142841cfd24b3a9b49e0c77511a2171a2a8b

See more details on using hashes here.

File details

Details for the file whitebox_plugin_pannellum-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for whitebox_plugin_pannellum-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 51d02d3dd2d13be12abfbba7d380265698a707ce279768024c98534e08aa8f02
MD5 d8164d58622ed5a92fff8cf2393c76ab
BLAKE2b-256 4336a8218293c06894783f42edce73f521dcdd9f161d6b9f481d7b9308f47f67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page