UNPKG

@dicdikshaorg/epub-player-v9

Version:

Contains Epub player library components powered by angular. These components are designed to be used in sunbird consumption platforms *(mobile app, web portal, offline desktop app)* to drive reusability, maintainability hence reducing the redundant develo

107 lines (106 loc) 4.01 kB
import { EventEmitter, OnInit, OnDestroy, ElementRef, AfterViewInit, Renderer2, OnChanges, SimpleChanges } from '@angular/core'; import { ViwerService } from './services/viewerService/viwer-service'; import { PlayerConfig } from './sunbird-epub-player.interface'; import { EpubPlayerService } from './sunbird-epub-player.service'; import { epubPlayerConstants } from './sunbird-epub.constant'; import { ErrorService } from '@project-sunbird/sunbird-player-sdk-v9'; import { UtilService } from './services/utilService/util.service'; import { NextContent } from '@project-sunbird/sunbird-player-sdk-v9/sunbird-player-sdk.interface'; import { HttpClient } from "@angular/common/http"; import { ToastrService } from './services/toastService/toastr.service'; export declare class EpubPlayerComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit { viwerService: ViwerService; private epubPlayerService; errorService: ErrorService; utilService: UtilService; private renderer2; http: HttpClient; private toastrService; fromConst: typeof epubPlayerConstants; epubPlayerRef: ElementRef; playerConfig: PlayerConfig; showFullScreen: boolean; headerActionsEvent: EventEmitter<any>; telemetryEvent: EventEmitter<any>; playerEvent: EventEmitter<object>; private unlistenMouseEnter; private unlistenMouseLeave; showControls: boolean; validPage: boolean; showContentError: boolean; sideMenuConfig: { showShare: boolean; showDownload: boolean; showReplay: boolean; showExit: boolean; showPrint: boolean; }; urlTTS: string; urlDetectLang: string; audio: any; audioQueue: any[]; playerState: { isPlaying: boolean; }; counter: number; loading: boolean; chunks: any[]; isStreamIntrupted: boolean; private cancelRequests$; languageList: { languageCode: string; modelId: string; }[]; isInitialized: boolean; viewState: epubPlayerConstants; intervalRef: any; progress: number; showEpubViewer: boolean; traceId: string; currentPageIndex: number; headerConfiguration: { rotation: boolean; goto: boolean; navigation: boolean; zoom: boolean; }; nextContent: NextContent; playbackRate: number; langCode: string; currentPageNo: number; mimeType: any; constructor(viwerService: ViwerService, epubPlayerService: EpubPlayerService, errorService: ErrorService, utilService: UtilService, renderer2: Renderer2, http: HttpClient, toastrService: ToastrService); onTelemetryEvent(event: any): void; ngOnInit(): Promise<void>; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; headerActions(eventdata: any): void; onPlaybackRateChange(event: any): void; handleNotification(): void; handleButtonplay(): void; handleButtonpause(): void; handleButtonstop(): void; getModelId(languageCode: string): string; detectLanguage(chunk: string): Promise<string | null>; handleButtonClick(gender: any): Promise<void>; extractTextFromElement(element: any): string; processChunk(chunk: string, gender: any, serviceId: string | null): Promise<void>; cancelRequests(): void; playNextAudio(): void; chunkText(text: string, chunkSize: number): string[]; viewerEvent(event: any): void; resetValidPage(): void; onEpubLoaded(event: any): void; onPageChange(event: any): void; onJumpToPage(type: any): void; onEpubEnded(event: any): void; onEpubLoadFailed(error: any): void; replayContent(event: any): void; exitContent(event: any): void; sideBarEvents(event: any): void; sidebarMenuEvent(event: any): void; getEpubLoadingProgress(): void; downloadEpub(): void; ngOnDestroy(): void; playNextContent(event: any): void; }