@een/live-video-web-sdk v1.9.0
Eagle Eye Networks Live Video Web SDK
Copyright (C) 2025 Eagle Eye Network B.V. - sales@een.com
This package allows EEN users to incorporate live video on their web solution. Copyright (C) 
2025 Eagle Eye Network B.V. - sales@een.com This software can not be copied and/or distributed 
without the express permission of Eagle Eye Networks.
Installation
Note: This is the development documentation. For the npm package documentation, please refer to the README.md file included in the published package.
npm install @een/live-video-web-sdkQuick Start
import VideoPlayer from '@een/live-video-web-sdk';
const player = new VideoPlayer({
  jwt: 'your-jwt-token',
  cameraId: 'your-camera-id',
  videoElement: document.getElementById('video') as HTMLVideoElement,
  onError: (error) => console.error('Player error:', error),
  onFrame: (time) => console.log('Frame rendered at:', time)
});
await player.start();Configuration Options
interface Config {
  cameraId?: string;                    // Camera identifier
  jwt: string;                         // Authentication JWT token
  videoElement?: HTMLVideoElement;      // Target video element
  canvasElement?: HTMLCanvasElement;    // Target canvas (WebCodecs only)
  maxBuffer?: number;                  // Maximum buffer size (0-10000ms)
  minBuffer?: number;                  // Minimum buffer size (default: 1000ms)
  videoTech?: "WebCodecs" | "FLV";     // Preferred playback technology
  feedUrl?: string;                    // Direct feed URL (optional)
  baseUrl?: string;                    // API base URL (auto-detected from JWT)
  eenUniqueId?: string;                // EEN system unique identifier
  
  // Event Callbacks
  onFrame?: (time: number) => void;
  onStop?: () => void;
  onAudio?: () => void;
  onSwitchToFlv?: () => void;
  onError?: (error: VideoPlayerError) => void;
  onWarning?: (warning: VideoPlayerWarning) => void;
}The SDK provides comprehensive error categorization:
Configuration Errors
- CONFIG_INVALID_JWT- Invalid or missing JWT token
- CONFIG_INVALID_VIDEO_TECH- Invalid video technology specified
- CONFIG_CANVAS_WITHOUT_WEBCODECS- Canvas element used without WebCodecs
- CONFIG_DUAL_VIDEO_TARGETS- Both video element and canvas provided
- CONFIG_INVALID_BUFFER_SIZE- Buffer size outside valid range
- CONFIG_MISSING_FEED_PARAMS- Missing required feed parameters
Network Errors
- NETWORK_FEED_FETCH_ERROR- Failed to fetch video feed
- NETWORK_JWT_DECODE_ERROR- JWT decoding failed
- NETWORK_STREAM_REQUEST_ERROR- Stream request failed
- NETWORK_CONNECTION_ERROR- Network connection error
- NETWORK_STREAM_WARNING- Stream warning (non-fatal)
Player Errors
- PLAYER_START_WHILE_PLAYING- Attempted to start while already playing
- PLAYER_MULTIPART_STREAM_ERROR- Multipart stream error
- PLAYER_FLV_START_ERROR- FLV player initialization error
- PLAYER_HARDWARE_ACCELERATION_ERROR- Hardware acceleration error
WebCodecs Errors
- WEBCODECS_VIDEO_DECODER_ERROR- Video decoder error
- WEBCODECS_AUDIO_DECODER_ERROR- Audio decoder error
- WEBCODECS_AUDIO_RENDER_ERROR- Audio rendering error
- WEBCODECS_VIDEO_RENDER_ERROR- Video rendering error
- WEBCODECS_AUDIO_CONFIG_ERROR- Audio configuration error
- WEBCODECS_FRAME_PROCESSING_ERROR- Frame processing error
API Methods
Core Methods
// Start video playback
await player.start(config?: Config): Promise<void>
// Stop video playback
player.stop(): void
// Check if currently playing
player.isPlaying(): booleanAudio Control (WebCodecs only)
// Audio muting
player.getAudioMuted(): boolean
player.setAudioMuted(muted: boolean): void
player.toggleMute(): void
// Volume control (0.0 - 1.0)
player.getAudioVolume(): number
player.setAudioVolume(volume: number): void
// Audio error checking
player.getAudioPlaybackError(): anyBuffer Management (WebCodecs only)
// Buffer configuration
player.setMaxBuffer(ms: number): void
player.setMinBuffer(ms: number): void
player.getBufferLength(): number10 months ago
5 months ago
5 months ago
5 months ago
10 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
12 months ago
5 months ago
5 months ago
6 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago