@readium/navigator 2.4.0-beta.1 → 2.4.0-beta.11

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.
@@ -7,7 +7,6 @@ export declare class WebAudioEngine implements AudioEngine {
7
7
  private sourceNode;
8
8
  private gainNode;
9
9
  private listeners;
10
- private currentPlaybackRate;
11
10
  private isMutedValue;
12
11
  private isPlayingValue;
13
12
  private isPausedValue;
@@ -47,17 +46,6 @@ export declare class WebAudioEngine implements AudioEngine {
47
46
  * @param callback - callback function to be removed.
48
47
  */
49
48
  off(event: string, callback: EventCallback): void;
50
- /**
51
- * Load the audio resource at the given URL.
52
- * @param url The URL of the audio resource.
53
- * */
54
- loadAudio(url: string): void;
55
- private deactivateWebAudio;
56
- /**
57
- * Sets the media element for playback.
58
- * @param element The HTML audio element to use.
59
- */
60
- setMediaElement(element: HTMLAudioElement): void;
61
49
  private ensureAudioContextRunning;
62
50
  private getOrCreateAudioContext;
63
51
  private onTimeUpdate;
@@ -144,6 +132,11 @@ export declare class WebAudioEngine implements AudioEngine {
144
132
  */
145
133
  private activateWebAudio;
146
134
  get isWebAudioActive(): boolean;
135
+ /**
136
+ * Changes the src of the primary media element without swapping the element.
137
+ * Preserves the RemotePlayback session and all attached event listeners.
138
+ */
139
+ changeSrc(href: string): void;
147
140
  /**
148
141
  * Returns the HTML media element used for playback.
149
142
  */
@@ -0,0 +1,8 @@
1
+ import { NavigatorProtector } from "../../protection/NavigatorProtector";
2
+ import { IContentProtectionConfig } from "../../Navigator";
3
+ export declare class AudioNavigatorProtector extends NavigatorProtector {
4
+ private dragAndDropProtector?;
5
+ private copyProtector?;
6
+ constructor(config?: IContentProtectionConfig);
7
+ destroy(): void;
8
+ }
@@ -0,0 +1,8 @@
1
+ export interface CopyProtectionOptions {
2
+ onCopyBlocked?: () => void;
3
+ }
4
+ export declare class CopyProtector {
5
+ private copyHandler;
6
+ constructor(options?: CopyProtectionOptions);
7
+ destroy(): void;
8
+ }
@@ -0,0 +1,10 @@
1
+ export interface DragAndDropProtectionOptions {
2
+ onDragDetected?: (dataTransferTypes: readonly string[]) => void;
3
+ onDropDetected?: (dataTransferTypes: readonly string[], fileCount: number) => void;
4
+ }
5
+ export declare class DragAndDropProtector {
6
+ private dragstartHandler;
7
+ private dropHandler;
8
+ constructor(options?: DragAndDropProtectionOptions);
9
+ destroy(): void;
10
+ }
@@ -6,7 +6,7 @@ export declare class NavigatorProtector {
6
6
  private iframeEmbeddingDetector?;
7
7
  private printProtector?;
8
8
  private contextMenuProtector?;
9
- private dispatchSuspiciousActivity;
9
+ protected dispatchSuspiciousActivity(type: string, detail: Record<string, unknown>): void;
10
10
  constructor(config?: IContentProtectionConfig);
11
11
  destroy(): void;
12
12
  }