@wistia/wistia-player
Advanced tools
Comparing version 0.0.44 to 0.0.45
@@ -28,5 +28,5 @@ import { Nilable } from '@wistia/type-guards'; | ||
getPreviousMedia(): PlaylistMedia; | ||
playMedia(media: PlaylistMedia): Promise<void>; | ||
playNextMedia(): Promise<void>; | ||
playPreviousMedia(): Promise<void>; | ||
playMedia(media: PlaylistMedia, overrideEmbedOptions?: EmbedOptions): Promise<void>; | ||
playNextMedia(overrideEmbedOptions?: EmbedOptions): Promise<void>; | ||
playPreviousMedia(overrideEmbedOptions?: EmbedOptions): Promise<void>; | ||
prefetchNextMedia(): void; | ||
@@ -33,0 +33,0 @@ prefetchPreviousMedia(): void; |
@@ -851,10 +851,2 @@ import type { Authorization, FullscreenState } from './types.ts'; | ||
/** | ||
* Adds a media to the playlist. | ||
* @param {string} mediaId - the id of the media to add | ||
* @param {object} options - embed options to apply for this media in the playlist | ||
* @param {object} position - position to add the media in the playlist | ||
* @returns {Promise<void>} | ||
*/ | ||
addToPlaylist(mediaId: string, options: object, position: object): Promise<void>; | ||
/** | ||
* Attempt to enter fullscreen mode. | ||
@@ -875,5 +867,5 @@ * @returns {Promise<void>} | ||
* @param {object} options object of plugin options related to the specific plugin | ||
* @returns {Promise<void>} returns a Promise that resolves with the defined plugin | ||
* @returns {Promise<keyof PluginInstances>} returns a Promise that resolves with the defined plugin | ||
*/ | ||
definePlugin(name: string, options: object): Promise<void>; | ||
definePlugin(name: string, options: object): Promise<keyof PluginInstances>; | ||
/** | ||
@@ -900,5 +892,5 @@ * Deletes an overlay with the specified name. | ||
* @param {string} name name of the plugin to retrieve | ||
* @returns {Promise<void>} returns a Promise that resolves with the request plugin | ||
* @returns {Promise<keyof PluginInstances>} returns a Promise that resolves with the request plugin | ||
*/ | ||
getPlugin(name: string): Promise<void>; | ||
getPlugin(name: string): Promise<keyof PluginInstances>; | ||
/** | ||
@@ -905,0 +897,0 @@ * Hides the specified overlay. |
@@ -1,2 +0,1 @@ | ||
import { ChannelEmbedOptions } from './channel.ts'; | ||
import { EmbedOptions } from './player-api-types.ts'; | ||
@@ -11,4 +10,17 @@ export type CarouselMediaType = { | ||
}; | ||
type CarouselMediaResponseType = { | ||
duration_in_seconds: number; | ||
embed_options: EmbedOptions; | ||
hashed_id: string; | ||
media_type: 'Audio' | 'Video'; | ||
name: string; | ||
thumbnail_url: string; | ||
}; | ||
export type CarouselPlayerEmbedOptions = Pick<EmbedOptions, 'playerColor'>; | ||
type CarouselPlaylistEmbedOptions = CarouselPlayerEmbedOptions & { | ||
shouldAutoPlay?: boolean; | ||
shouldLoop?: boolean; | ||
}; | ||
export type CarouselData = { | ||
embedOptions: ChannelEmbedOptions; | ||
embedOptions: CarouselPlaylistEmbedOptions; | ||
episodeCount: number; | ||
@@ -20,2 +32,22 @@ hashedId: string; | ||
}; | ||
type CarouselDataFromServer = { | ||
embed_options: CarouselPlaylistEmbedOptions; | ||
episode_count: number; | ||
error: never; | ||
hashed_id: string; | ||
medias: CarouselMediaResponseType[]; | ||
name: string; | ||
numeric_id: number; | ||
}; | ||
type CarouselDataServerErrorResponse = { | ||
embed_options: never; | ||
episode_count: never; | ||
error: boolean; | ||
hashed_id: never; | ||
medias: never; | ||
name: never; | ||
numeric_id: never; | ||
}; | ||
export type CarouselDataResponse = Promise<CarouselDataFromServer | CarouselDataServerErrorResponse>; | ||
export {}; | ||
//# sourceMappingURL=carousel.d.ts.map |
@@ -186,2 +186,3 @@ import { ContainerNode } from 'preact'; | ||
playButton?: boolean; | ||
playerColor?: string; | ||
playerLanguage?: Language | string; | ||
@@ -275,3 +276,3 @@ playsinline?: boolean; | ||
_opts: EmbedOptions | undefined; | ||
addPlugin: (name: string, options: object) => Promise<void>; | ||
addPlugin: (name: string, options: object) => Promise<keyof PluginInstances>; | ||
addToPlaylist: (hashedId: string, options: object, position: object) => Record<string, object | string>[]; | ||
@@ -302,3 +303,3 @@ aspect: () => number; | ||
playerLanguage: () => Language | string; | ||
plugin: (name: string) => Promise<void>; | ||
plugin: (name: string) => Promise<keyof PluginInstances>; | ||
popover: Popover | undefined; | ||
@@ -305,0 +306,0 @@ preload: (val?: string) => string; |
{ | ||
"name": "@wistia/wistia-player", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"packageManager": "yarn@4.2.2", | ||
@@ -5,0 +5,0 @@ "description": "An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1740546
17631