@wistia/react-embeds
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -17,5 +17,10 @@ 'use strict'; | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
} | ||
@@ -28,8 +33,15 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
@@ -59,5 +71,2 @@ | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
@@ -93,5 +102,2 @@ } | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -343,3 +349,3 @@ } | ||
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', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playButton', 'playbar', 'playerColor', 'playlistLinks', 'playlistLoop', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']); | ||
var PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes', | ||
@@ -455,2 +461,5 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime', | ||
value: function componentDidMount() { | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
this.prepareForPlayerSetup(this.props.hashedId); | ||
@@ -463,5 +472,2 @@ this.context.dispatch({ | ||
}); | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
} | ||
@@ -555,11 +561,3 @@ }, { | ||
PLAYER_EVENT_KEYS.forEach(function (event) { | ||
return bindToEvent(event, function () { | ||
var _this2$props$event, _this2$props; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
return (_this2$props$event = (_this2$props = _this2.props)[event]) === null || _this2$props$event === void 0 ? void 0 : _this2$props$event.call.apply(_this2$props$event, [_this2$props].concat(args)); | ||
}); | ||
return bindToEvent(event, _this2.props[event]); | ||
}); | ||
@@ -601,4 +599,3 @@ | ||
_this3.setupPlayerAfterReady(player); | ||
}, | ||
options: this.props.customOptions ? this.props.customOptions : {} | ||
} | ||
}; | ||
@@ -622,6 +619,4 @@ window._wq = window._wq || []; | ||
autoPlay: propTypes__default["default"].bool, | ||
chromeless: propTypes__default["default"].bool, | ||
controlsVisibleOnLoad: propTypes__default["default"].bool, | ||
customEvents: propTypes__default["default"].object, | ||
customOptions: propTypes__default["default"].object, | ||
doNotTrack: propTypes__default["default"].bool, | ||
@@ -645,3 +640,2 @@ email: propTypes__default["default"].string, | ||
playlistLoop: propTypes__default["default"].bool, | ||
playPauseNotifier: propTypes__default["default"].bool, | ||
popover: propTypes__default["default"].bool, | ||
@@ -655,3 +649,2 @@ popoverAnimateThumbnail: propTypes__default["default"].bool, | ||
qualityMin: propTypes__default["default"].oneOfType([propTypes__default["default"].number, propTypes__default["default"].oneOf(['360p', '540p', '720p', '1080p', '4k'])]), | ||
resumable: propTypes__default["default"].oneOf([true, false, 'auto']), | ||
seo: propTypes__default["default"].bool, | ||
@@ -658,0 +651,0 @@ settingsControl: propTypes__default["default"].bool, |
@@ -12,5 +12,10 @@ 'use strict'; | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
} | ||
@@ -23,8 +28,15 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
@@ -54,5 +66,2 @@ | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
@@ -88,5 +97,2 @@ } | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -327,3 +333,3 @@ } | ||
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', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playButton', 'playbar', 'playerColor', 'playlistLinks', 'playlistLoop', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']); | ||
var PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes', | ||
@@ -439,2 +445,5 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime', | ||
value: function componentDidMount() { | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
this.prepareForPlayerSetup(this.props.hashedId); | ||
@@ -447,5 +456,2 @@ this.context.dispatch({ | ||
}); | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
} | ||
@@ -539,11 +545,3 @@ }, { | ||
PLAYER_EVENT_KEYS.forEach(function (event) { | ||
return bindToEvent(event, function () { | ||
var _this2$props$event, _this2$props; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
return (_this2$props$event = (_this2$props = _this2.props)[event]) === null || _this2$props$event === void 0 ? void 0 : _this2$props$event.call.apply(_this2$props$event, [_this2$props].concat(args)); | ||
}); | ||
return bindToEvent(event, _this2.props[event]); | ||
}); | ||
@@ -585,4 +583,3 @@ | ||
_this3.setupPlayerAfterReady(player); | ||
}, | ||
options: this.props.customOptions ? this.props.customOptions : {} | ||
} | ||
}; | ||
@@ -589,0 +586,0 @@ window._wq = window._wq || []; |
@@ -117,3 +117,3 @@ 'use strict'; | ||
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', 'controlsVisibleOnLoad', 'doNotTrack', 'email', 'embedHost', 'endVideoBehavior', 'fullscreenButton', 'googleAnalytics', 'hashedId', 'height', 'hls', 'id', 'idType', 'muted', 'playbackRateControl', 'playButton', 'playbar', 'playerColor', 'playlistLinks', 'playlistLoop', 'popover', 'popoverAnimateThumbnail', 'popoverContent', 'popoverOverlayOpacity', 'preload', 'qualityControl', 'qualityMax', 'qualityMin', 'seo', 'settingsControl', 'silentAutoPlay', 'smallPlayButton', 'stillUrl', 'time', 'videoFoam', 'volume', 'volumeControl', 'width', 'wmode']); | ||
const PLAYER_EVENT_KEYS = new Set(['onAfterReplace', 'onBeforeRemove', 'onBeforeReplace', // 'onBetweenTimes', | ||
@@ -203,2 +203,5 @@ 'onCancelFullscreen', 'onCaptionsChange', 'onConversion', // 'onCrosstime', | ||
componentDidMount() { | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
this.prepareForPlayerSetup(this.props.hashedId); | ||
@@ -211,5 +214,2 @@ this.context.dispatch({ | ||
}); | ||
this.setState({ | ||
safeToRender: true | ||
}); | ||
} | ||
@@ -289,8 +289,4 @@ | ||
PLAYER_EVENT_KEYS.forEach(event => bindToEvent(event, (...args) => { | ||
var _this$props$event, _this$props; | ||
PLAYER_EVENT_KEYS.forEach(event => bindToEvent(event, this.props[event])); | ||
return (_this$props$event = (_this$props = this.props)[event]) === null || _this$props$event === void 0 ? void 0 : _this$props$event.call(_this$props, ...args); | ||
})); | ||
if (this.props.customEvents) { | ||
@@ -306,5 +302,5 @@ // bind to any custom events the user may have passed in | ||
const handleEvent = (event, player) => { | ||
var _this$props$event2, _this$props2; | ||
var _this$props$event, _this$props; | ||
(_this$props$event2 = (_this$props2 = this.props)[event]) === null || _this$props$event2 === void 0 ? void 0 : _this$props$event2.call(_this$props2, player); | ||
(_this$props$event = (_this$props = this.props)[event]) === null || _this$props$event === void 0 ? void 0 : _this$props$event.call(_this$props, player); | ||
}; | ||
@@ -319,4 +315,3 @@ | ||
this.setupPlayerAfterReady(player); | ||
}, | ||
options: this.props.customOptions ? this.props.customOptions : {} | ||
} | ||
}; | ||
@@ -338,6 +333,4 @@ window._wq = window._wq || []; | ||
autoPlay: propTypes__default["default"].bool, | ||
chromeless: propTypes__default["default"].bool, | ||
controlsVisibleOnLoad: propTypes__default["default"].bool, | ||
customEvents: propTypes__default["default"].object, | ||
customOptions: propTypes__default["default"].object, | ||
doNotTrack: propTypes__default["default"].bool, | ||
@@ -361,3 +354,2 @@ email: propTypes__default["default"].string, | ||
playlistLoop: propTypes__default["default"].bool, | ||
playPauseNotifier: propTypes__default["default"].bool, | ||
popover: propTypes__default["default"].bool, | ||
@@ -371,3 +363,2 @@ popoverAnimateThumbnail: propTypes__default["default"].bool, | ||
qualityMin: propTypes__default["default"].oneOfType([propTypes__default["default"].number, propTypes__default["default"].oneOf(['360p', '540p', '720p', '1080p', '4k'])]), | ||
resumable: propTypes__default["default"].oneOf([true, false, 'auto']), | ||
seo: propTypes__default["default"].bool, | ||
@@ -374,0 +365,0 @@ settingsControl: propTypes__default["default"].bool, |
{ | ||
"name": "@wistia/react-embeds", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "React component wrappers for Wistia embeddables", | ||
@@ -17,3 +17,3 @@ "browser": "browser.js", | ||
"author": "Wistia Engineering", | ||
"license": "ISC", | ||
"license": "MIT", | ||
"devDependencies": { | ||
@@ -42,2 +42,2 @@ "@babel/core": "^7.15.5", | ||
} | ||
} | ||
} |
@@ -24,3 +24,3 @@ # Wistia component wrappers for React | ||
Using wistia-react in an app that does universal rendering, you can get your | ||
Using `@wistia/react-embeds` in an app that does universal rendering, you can get your | ||
video-related SEO data into the server-rendered HTML, which means scrapers that | ||
@@ -34,3 +34,3 @@ don’t evaluate JS will still pick the information up. This is particularly | ||
```bash | ||
npm install wistia-react | ||
npm install @wistia/react-embeds | ||
``` | ||
@@ -37,0 +37,0 @@ |
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
30
175835
4646