strataplayer 1.2.20 → 1.2.22

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.
package/README.md CHANGED
@@ -172,7 +172,9 @@ The `<StrataPlayer />` component accepts the following configuration options.
172
172
  | **themeColor** | `string` | `'#6366f1'` | Primary accent color (Hex, RGB). |
173
173
  | **iconSize** | `string` | `'medium'` | `'small'`, `'medium'`, or `'large'`. |
174
174
  | **backdrop** | `boolean` | `true` | Enable background blur effects in menus. |
175
- | **autoSize** | `boolean` | `false` | Toggles `object-fit: cover`. |
175
+ | **autoSize** | `boolean` | `false` | Toggles `object-fit: cover`. (Legacy: use `videoFit`) |
176
+ | **videoFit** | `string` | `'contain'` | Sets initial video scaling (`contain`, `cover`, `fill`, `none`). |
177
+ | **brightness** | `number` | `1` | Initial video brightness filter (0.0 to 2.0). |
176
178
  | **highlight** | `Highlight[]` | `[]` | Markers to display on the timeline. |
177
179
 
178
180
  ### Functionality & Controls
@@ -253,4 +255,3 @@ Contributions are welcome! Please follow these steps:
253
255
  ## License
254
256
 
255
257
  Distributed under the MIT License. See `LICENSE` for more information.
256
-
@@ -39,6 +39,7 @@ export interface SubtitleSettings {
39
39
  }
40
40
  export declare const DEFAULT_SUBTITLE_SETTINGS: SubtitleSettings;
41
41
  export type PlayerTheme = 'default' | 'pixel' | 'game' | 'hacker';
42
+ export type VideoFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
42
43
  export interface PlayerSource {
43
44
  url: string;
44
45
  type?: 'hls' | 'mp4' | 'webm' | 'dash' | 'mpegts' | 'webtorrent' | string;
@@ -151,6 +152,8 @@ export interface PlayerState {
151
152
  vertical: boolean;
152
153
  };
153
154
  aspectRatio: string;
155
+ videoFit: VideoFit;
156
+ brightness: number;
154
157
  isAutoSized: boolean;
155
158
  isLooping: boolean;
156
159
  controlsVisible: boolean;
@@ -172,6 +175,8 @@ export interface StrataConfig {
172
175
  iconSize?: 'small' | 'medium' | 'large';
173
176
  backdrop?: boolean;
174
177
  autoSize?: boolean;
178
+ brightness?: number;
179
+ videoFit?: VideoFit;
175
180
  subtitleSettings?: Partial<SubtitleSettings>;
176
181
  screenshot?: boolean;
177
182
  setting?: boolean;
@@ -217,7 +222,7 @@ export declare class StrataCore {
217
222
  private currentSource;
218
223
  private currentSrc;
219
224
  private trackConfigs;
220
- private currentDownloadController;
225
+ private activeDownloads;
221
226
  private castInitialized;
222
227
  private boundCueChange;
223
228
  private boundFullscreenChange;
@@ -279,6 +284,8 @@ export declare class StrataCore {
279
284
  toggleLoop(): void;
280
285
  setFlip(direction: 'horizontal' | 'vertical'): void;
281
286
  setAspectRatio(ratio: string): void;
287
+ setVideoFit(fit: VideoFit): void;
288
+ setBrightness(val: number): void;
282
289
  private updateAspectRatio;
283
290
  private initCast;
284
291
  requestCast(): void;
@@ -288,7 +295,7 @@ export declare class StrataCore {
288
295
  updateSubtitleSettings(settings: Partial<SubtitleSettings>): void;
289
296
  resetSubtitleSettings(): void;
290
297
  setSubtitleOffset(offset: number): void;
291
- cancelDownload(): void;
298
+ cancelDownload(id?: string): void;
292
299
  download(options?: {
293
300
  format?: 'ts' | 'mp4';
294
301
  }): Promise<void>;