UNPKG

@byomakase/omakase-player

Version:

## Omakase Player - Open source JavaScript framework for building frame accurate video experiences

20 lines (19 loc) 1.64 kB
import Konva from 'konva'; import { Observable } from 'rxjs'; import { AuthenticationData } from '../common/authentication'; import { ThumbnailVttCueXYWH } from '../types'; export declare class ImageUtil { private static _spriteCache; static getProtectedImageUrl(url: string, authentication: AuthenticationData): Observable<string>; static createKonvaImage(url: string, authentication?: AuthenticationData): Observable<Konva.Image>; static createKonvaImageFromSprite(url: string, xywh: ThumbnailVttCueXYWH, authentication?: AuthenticationData): Observable<Konva.Image>; static cropSpriteImage(image: Konva.Image, xywh: ThumbnailVttCueXYWH): Konva.Image; static createKonvaImageSizedByWidth(url: string, width: number, authentication?: AuthenticationData): Observable<Konva.Image>; static createKonvaImageSizedByHeight(url: string, height: number, authentication?: AuthenticationData): Observable<Konva.Image>; static createKonvaImageFromSpriteByHeight(imageUrl: string, xywh: ThumbnailVttCueXYWH, height: number, authentication?: AuthenticationData): Observable<Konva.Image>; static createKonvaImageFromSpriteByWidth(imageUrl: string, xywh: ThumbnailVttCueXYWH, width: number, authentication?: AuthenticationData): Observable<Konva.Image>; static calculateProportionalHeight(width: number, image: Konva.Image): number; static calculateProportionalWidth(height: number, image: Konva.Image): number; static calculateProportionalHeightForSprite(width: number, xywh: ThumbnailVttCueXYWH): number; static calculateProportionalWidthForSprite(height: number, xywh: ThumbnailVttCueXYWH): number; }