@broadcastingplatforms/player 0.0.0-dev.e67afbe → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,9 +48,13 @@ export declare class BPDefaultUI extends LitElement {
48
48
  private detectMobile;
49
49
  private _getPoster;
50
50
  protected firstUpdated(_changedProperties: PropertyValues): void;
51
+ protected willUpdate(_changedProperties: PropertyValues): void;
51
52
  protected updated(_changedProperties: PropertyValues): void;
52
- /** Set initial video dimensions from preferredOrientation hint */
53
- private _setInitialVideoDimensionsFromSources;
53
+ /**
54
+ * Sets content-type eagerly so the correct controls render on first paint,
55
+ * and applies fluid dimension hints from preferredOrientation.
56
+ */
57
+ private _applySourceHints;
54
58
  /** Update video dimension CSS variables */
55
59
  private _updateVideoDimensions;
56
60
  /** Clear video dimension CSS variables */
@@ -141,6 +141,7 @@ export declare class PlayerCoreImpl implements PlayerCore {
141
141
  private _bpLive;
142
142
  private _currentProviderType;
143
143
  private _ready;
144
+ private _loadGeneration;
144
145
  constructor();
145
146
  get state(): PlayerState;
146
147
  get videoElement(): HTMLVideoElement | null;
@@ -156,9 +157,6 @@ export declare class PlayerCoreImpl implements PlayerCore {
156
157
  */
157
158
  attach(container: HTMLElement, config?: ProviderConfig): void;
158
159
  loadSource(source: string | PlayerSource, container?: HTMLElement, config?: ProviderConfig): Promise<SourceLoadResult | void>;
159
- /**
160
- * Destroy the current media element and clean up listeners.
161
- */
162
160
  private destroyMediaElement;
163
161
  private createMediaElement;
164
162
  private attachMediaElementListeners;
@@ -1,3 +1,5 @@
1
+ import type { ProviderType } from '../providers/contract';
2
+ export type { ProviderType };
1
3
  export interface PlayerState {
2
4
  readonly paused: boolean;
3
5
  readonly playing: boolean;
@@ -36,7 +38,6 @@ export interface QualityLevel {
36
38
  export type PresentationMode = 'inline' | 'fullscreen' | 'pip';
37
39
  export type ConnectionState = 'idle' | 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'failed';
38
40
  export type StreamType = 'vod' | 'live' | 'dvr';
39
- export type ProviderType = 'video' | 'nano' | 'livekit';
40
41
  export type ContentType = 'clip' | 'stream' | 'video';
41
42
  export type ErrorCategory = 'offline' | 'network' | 'security' | 'media' | 'autoplay' | 'setup' | 'unknown';
42
43
  export interface PlayerError {
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { BPOverlay, type OverlayType } from './components/bp-overlay';
5
5
  export { addGlobalStyles, createTemplate, templateWithStyles } from './styles/index';
6
6
  export { Attribute, toggleAttribute } from './util/attribute';
7
7
  export { HlsVideoElement, HlsVideo, Hls, NanoVideoElement, NanoVideo, LiveKitVideoElement, LiveKitVideo, } from './elements/index';
8
- export { createPlayerCore, PlayerCoreImpl } from './core/player-core';
8
+ export { createPlayerCore } from './core/player-core';
9
9
  export type { PlayerCore, PlayerCoreEventMap, PlayerCoreEventType, CustomVideoElement } from './core/player-core';
10
10
  export { createInitialState, classifyNanoPlayerError, classifyLiveKitError, NANOPLAYER_NO_REPLAY_CODES } from './core/state';
11
11
  export type { PlayerState, QualityLevel, PresentationMode, ConnectionState, StreamType, ContentType, PlayerError, ErrorCategory, } from './core/state';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broadcastingplatforms/player",
3
- "version": "0.0.0-dev.e67afbe",
3
+ "version": "1.3.0",
4
4
  "description": "Universal video player web component built with Lit",
5
5
  "type": "module",
6
6
  "main": "dist/bp-player.js",
@@ -9,8 +9,7 @@
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
- "import": "./dist/bp-player.mjs",
13
- "require": "./dist/bp-player.js"
12
+ "import": "./dist/bp-player.mjs"
14
13
  },
15
14
  "./standalone": {
16
15
  "types": "./dist/index.d.ts",
@@ -23,6 +22,16 @@
23
22
  "dist/",
24
23
  "!**/*.map"
25
24
  ],
25
+ "scripts": {
26
+ "build": "bun run build:types && bun run build:bundle",
27
+ "build:types": "tsc --emitDeclarationOnly",
28
+ "build:bundle": "node build.mjs",
29
+ "build:prod": "NODE_ENV=production bun run build",
30
+ "dev": "concurrently \"tsc --emitDeclarationOnly --watch --preserveWatchOutput\" \"node build.mjs --watch\"",
31
+ "dev:demo": "vite",
32
+ "clean": "rm -rf dist tsconfig.tsbuildinfo",
33
+ "typecheck": "tsc --noEmit"
34
+ },
26
35
  "dependencies": {
27
36
  "better-call": "^1.0.6",
28
37
  "custom-media-element": "^1.4.0",
@@ -39,16 +48,8 @@
39
48
  "typescript": "^5.7.2",
40
49
  "vite": "^6.0.5"
41
50
  },
42
- "license": "UNLICENSED",
51
+ "license": "SEE LICENSE IN LICENSE",
43
52
  "publishConfig": {
44
53
  "access": "public"
45
- },
46
- "scripts": {
47
- "build": "pnpm build:types && pnpm build:bundle",
48
- "build:types": "tsc --emitDeclarationOnly",
49
- "build:bundle": "node build.mjs",
50
- "build:prod": "NODE_ENV=production pnpm build",
51
- "dev": "concurrently \"tsc --emitDeclarationOnly --watch --preserveWatchOutput\" \"node build.mjs --watch\"",
52
- "dev:demo": "vite"
53
54
  }
54
- }
55
+ }