UNPKG

cloudinary-video-player

Version:
58 lines (55 loc) 2.65 kB
import { c as createVideoPlayer, a as createPlayerWithConfig } from './video-player.js'; import { s as setupCloudinaryGlobal, c as createMultipleSync, a as createMultiplePlayers, b as createAsyncPlayer } from './player-api.js'; import './_videojs-proxy.js'; import './_commonjsHelpers.js'; import './index2.js'; import './video-player.const.js'; import './cloudinary-config-from-options.js'; import './cloudinary-url-prefix.js'; import './validators-functions.js'; /** * UMD entry: full player bundle for backwards-compatible sync videoPlayer(). * player() is async with profile and schedule support. */ const videoPlayer = function (id) { let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let ready = arguments.length > 2 ? arguments[2] : undefined; return createVideoPlayer(id, playerOptions, ready); }; const videoPlayers = (selector, playerOptions, ready) => createMultipleSync(selector, playerOptions, ready, videoPlayer); const player = function (id) { let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let ready = arguments.length > 2 ? arguments[2] : undefined; return createAsyncPlayer(id, playerOptions, ready, createPlayerWithConfig); }; const players = (selector, playerOptions, ready) => createMultiplePlayers(selector, playerOptions, ready, player); const cloudinaryVideoPlayerLegacyConfig = function () { let instanceConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; console.warn('Cloudinary.new() is deprecated and will be removed. Please use cloudinary.videoPlayer() instead.'); const mergeOpts = function () { let callOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Object.assign({}, instanceConfig, callOpts); }; return { videoPlayer: function (id) { let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let ready = arguments.length > 2 ? arguments[2] : undefined; return createVideoPlayer(id, mergeOpts(playerOptions), ready); }, videoPlayers: function (selector) { let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let ready = arguments.length > 2 ? arguments[2] : undefined; return createMultipleSync(selector, mergeOpts(playerOptions), ready, videoPlayer); } }; }; var index_full = setupCloudinaryGlobal({ videoPlayer, videoPlayers, player, players, Cloudinary: { new: cloudinaryVideoPlayerLegacyConfig } }); export { index_full as default, player, players, videoPlayer, videoPlayers };