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.4.tar.gz (16.9 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.4-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whitebox_plugin_pannellum-0.1.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0.dev0 CPython/3.10.19 Linux/5.15.154+

File hashes

Hashes for whitebox_plugin_pannellum-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8960ea537faa4f587e21a36a632deacca9696f84410ec5a3816a692c1bdf1ae7
MD5 bcbaf0ce6edacf511e7997fa2e810b63
BLAKE2b-256 b602649d9816920cddc20177108e4cb00da8b7ac92d4d3546e84d31139a25004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whitebox_plugin_pannellum-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f6abc82aa48a19897ead502a8ec6c6d5e54c4d73b9f6698b678af03f8dbcb3db
MD5 82a619316340b50357f64586a6fb19bd
BLAKE2b-256 8496970831ec192d916601269603f52182efdb005cd8bb20521807a5918016af

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