Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wistia/react-embeds

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wistia/react-embeds - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

src/components/README.md

28

dist/index.browser.dev.js

@@ -353,3 +353,3 @@ 'use strict';

var DEFAULT_ASPECT_RATIO = 640 / 360;
var PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
var PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fitStrategy', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
var PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes',

@@ -414,3 +414,3 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime',

get: function get() {
return "".concat(this.embedClassNames, " ").concat(this.optionsAsCSSClassNames);
return "".concat(this.embedClassNames, " ").concat(this.optionsAsCSSClassNames, " ").concat(this.props.className);
}

@@ -504,2 +504,18 @@ }, {

}, {
key: "computedVideoFoam",
get: function get() {
// We expect videoFoam to be present EXCEPT for the following situations:
// 1) If width or height are set,
// 2) if popoverContent is set,
// 3) if videoFoam is explicitly set to false by prop
var isPopoverContent = this.isPopoverHtml || this.isPopoverLink;
/* #1 */
var hasDimensions = this.props.height || this.props.width;
/* #2 */
var getsVideoFoam = !isPopoverContent && !hasDimensions;
return isUndefined(this.props.videoFoam) ? getsVideoFoam : this.props.videoFoam;
}
}, {
key: "optionsAsCSSClassNames",

@@ -576,3 +592,3 @@ get: function get() {

if (this.props.videoFoam) {
if (this.computedVideoFoam) {
return /*#__PURE__*/react.createElement("div", {

@@ -707,9 +723,6 @@ className: "wistia_responsive_padding",

_defineProperty(WistiaPlayer, "defaultProps", {
videoFoam: true
});
_defineProperty(WistiaPlayer, "propTypes", {
autoPlay: propTypes__default["default"].bool,
chromeless: propTypes__default["default"].bool,
className: propTypes__default["default"].string,
controlsVisibleOnLoad: propTypes__default["default"].bool,

@@ -722,2 +735,3 @@ customEvents: propTypes__default["default"].object,

endVideoBehavior: propTypes__default["default"].oneOf(['default', 'loop', 'reset']),
fitStrategy: propTypes__default["default"].oneOf(['fill', 'contain', 'cover', 'none']),
fullscreenButton: propTypes__default["default"].bool,

@@ -724,0 +738,0 @@ googleAnalytics: propTypes__default["default"].bool,

@@ -337,3 +337,3 @@ 'use strict';

var DEFAULT_ASPECT_RATIO = 640 / 360;
var PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
var PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fitStrategy', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
var PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes',

@@ -398,3 +398,3 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime',

get: function get() {
return "".concat(this.embedClassNames, " ").concat(this.optionsAsCSSClassNames);
return "".concat(this.embedClassNames, " ").concat(this.optionsAsCSSClassNames, " ").concat(this.props.className);
}

@@ -488,2 +488,18 @@ }, {

}, {
key: "computedVideoFoam",
get: function get() {
// We expect videoFoam to be present EXCEPT for the following situations:
// 1) If width or height are set,
// 2) if popoverContent is set,
// 3) if videoFoam is explicitly set to false by prop
var isPopoverContent = this.isPopoverHtml || this.isPopoverLink;
/* #1 */
var hasDimensions = this.props.height || this.props.width;
/* #2 */
var getsVideoFoam = !isPopoverContent && !hasDimensions;
return isUndefined(this.props.videoFoam) ? getsVideoFoam : this.props.videoFoam;
}
}, {
key: "optionsAsCSSClassNames",

@@ -560,3 +576,3 @@ get: function get() {

if (this.props.videoFoam) {
if (this.computedVideoFoam) {
return /*#__PURE__*/react.createElement("div", {

@@ -691,6 +707,2 @@ className: "wistia_responsive_padding",

_defineProperty(WistiaPlayer, "defaultProps", {
videoFoam: true
});
function isWistiaPlayerOptionEntry(_ref3) {

@@ -697,0 +709,0 @@ var _ref4 = _slicedToArray(_ref3, 2),

@@ -125,3 +125,3 @@ 'use strict';

const DEFAULT_ASPECT_RATIO = 640 / 360;
const PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
const PLAYER_OPTION_KEYS = new Set(['autoPlay', 'chromeless', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fitStrategy', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playbar', 'playButton', 'playerColor', 'playlistLinks', 'playlistLoop', 'playPauseNotifier', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'resumable', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']);
const PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes',

@@ -168,3 +168,3 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime',

get classNames() {
return `${this.embedClassNames} ${this.optionsAsCSSClassNames}`;
return `${this.embedClassNames} ${this.optionsAsCSSClassNames} ${this.props.className}`;
}

@@ -246,2 +246,17 @@

get computedVideoFoam() {
// We expect videoFoam to be present EXCEPT for the following situations:
// 1) If width or height are set,
// 2) if popoverContent is set,
// 3) if videoFoam is explicitly set to false by prop
const isPopoverContent = this.isPopoverHtml || this.isPopoverLink;
/* #1 */
const hasDimensions = this.props.height || this.props.width;
/* #2 */
const getsVideoFoam = !isPopoverContent && !hasDimensions;
return isUndefined(this.props.videoFoam) ? getsVideoFoam : this.props.videoFoam;
}
get optionsAsCSSClassNames() {

@@ -312,3 +327,3 @@ return Object.entries(this.props).filter(isWistiaPlayerOptionEntry).map(serializeOptionEntry).join(' ');

if (this.props.videoFoam) {
if (this.computedVideoFoam) {
return /*#__PURE__*/react.createElement("div", {

@@ -416,9 +431,6 @@ className: "wistia_responsive_padding",

_defineProperty(WistiaPlayer, "defaultProps", {
videoFoam: true
});
_defineProperty(WistiaPlayer, "propTypes", {
autoPlay: propTypes__default["default"].bool,
chromeless: propTypes__default["default"].bool,
className: propTypes__default["default"].string,
controlsVisibleOnLoad: propTypes__default["default"].bool,

@@ -431,2 +443,3 @@ customEvents: propTypes__default["default"].object,

endVideoBehavior: propTypes__default["default"].oneOf(['default', 'loop', 'reset']),
fitStrategy: propTypes__default["default"].oneOf(['fill', 'contain', 'cover', 'none']),
fullscreenButton: propTypes__default["default"].bool,

@@ -433,0 +446,0 @@ googleAnalytics: propTypes__default["default"].bool,

{
"name": "@wistia/react-embeds",
"version": "0.0.13",
"version": "0.0.14",
"description": "React component wrappers for Wistia embeddables",

@@ -5,0 +5,0 @@ "browser": "browser.js",

@@ -98,4 +98,4 @@ # Wistia component wrappers for React

unusual to not want this behavior, so it defaults to `true` if it has not been
explicitly defined. if `videoFoam` is set to `false`, explicit `width` and `height` values should
be passed in as an object to th `style` prop.
explicitly defined. if `videoFoam` is set to `false`, explicit `width` and
`height` values should be passed in by prop.

@@ -102,0 +102,0 @@ ```js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc