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.5.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.5-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whitebox_plugin_pannellum-0.1.5.tar.gz
  • Upload date:
  • Size: 17.2 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.5.tar.gz
Algorithm Hash digest
SHA256 e67dfcda0c86e9bf908cc95ba03d9302fe0dd8733bb10f78a798bfcad5d09cbd
MD5 f1e4535f0273ba430eb2e3f23c35e05c
BLAKE2b-256 0a8863188a9087d1d2794961ad2d134ee0a7c5bd6e588cf9ccc3c7b994d35677

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whitebox_plugin_pannellum-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 50993f8ad98d9766b277306fe9c09d95a314690943e17c34b416a04fe05fefcb
MD5 c5319872cfd42de26527b5dba241ff12
BLAKE2b-256 2060293224f43d93ee40a36c58c7177686e8360493fa2eede50e5530bee6334b

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