Socket
Socket
Sign inDemoInstall

react-hover-video-player

Package Overview
Dependencies
6
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.6.3 to 6.7.0

6

es/index.js

@@ -42,2 +42,5 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

* - **"auto"**: The whole video file should be preloaded even if it won't be played
* @param {string} [crossOrigin='anonymous'] - Sets how the video element should handle CORS requests. Accepts one of the following values:
* - **"anonymous"**: CORS requests will have the credentials flag set to 'same-origin'
* - **"use-credentials"**: CORS requests for this element will have the credentials flag set to 'include'
* @param {string} [className] - Optional className to apply custom styling to the container element

@@ -88,2 +91,4 @@ * @param {object} [style] - Style object to apply custom inlined styles to the hover player container

preload = _ref$preload === void 0 ? null : _ref$preload,
_ref$crossOrigin = _ref.crossOrigin,
crossOrigin = _ref$crossOrigin === void 0 ? 'anonymous' : _ref$crossOrigin,
_ref$className = _ref.className,

@@ -421,2 +426,3 @@ className = _ref$className === void 0 ? '' : _ref$className,

preload: preload,
crossOrigin: crossOrigin,
ref: videoRef,

@@ -423,0 +429,0 @@ style: _extends({}, videoSizingStyles[sizingMode], {

@@ -52,2 +52,5 @@ "use strict";

* - **"auto"**: The whole video file should be preloaded even if it won't be played
* @param {string} [crossOrigin='anonymous'] - Sets how the video element should handle CORS requests. Accepts one of the following values:
* - **"anonymous"**: CORS requests will have the credentials flag set to 'same-origin'
* - **"use-credentials"**: CORS requests for this element will have the credentials flag set to 'include'
* @param {string} [className] - Optional className to apply custom styling to the container element

@@ -97,2 +100,4 @@ * @param {object} [style] - Style object to apply custom inlined styles to the hover player container

preload = _ref$preload === void 0 ? null : _ref$preload,
_ref$crossOrigin = _ref.crossOrigin,
crossOrigin = _ref$crossOrigin === void 0 ? 'anonymous' : _ref$crossOrigin,
_ref$className = _ref.className,

@@ -443,2 +448,3 @@ className = _ref$className === void 0 ? '' : _ref$className,

preload: preload,
crossOrigin: crossOrigin,
ref: videoRef,

@@ -445,0 +451,0 @@ style: _extends({}, _constants.videoSizingStyles[sizingMode], {

2

package.json
{
"name": "react-hover-video-player",
"version": "6.6.3",
"version": "6.7.0",
"description": "React component which manages playing a video when the user hovers over it and pausing when they stop.",

@@ -5,0 +5,0 @@ "main": "es/index.js",

@@ -21,2 +21,3 @@ # React Hover Video Player

- [videoCaptions](#videocaptions)
- [crossOrigin](#crossorigin)
1. **[Overlays](#overlays)**

@@ -171,2 +172,19 @@ - [pausedOverlay](#pausedoverlay)

### crossOrigin
**Type**: `string` | **Default**: `"anonymous"`
The `crossOrigin` prop maps directly to the [HTML Video element's crossorigin attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin) and allows us to define how the video element should handle CORS requests. For most purposes, you should not need to worry about setting this. The acceptable values are:
- `"anonymous"`: The video element will send cross-origin requests with no credentials. This is the browser default and usually all you need for most purposes.
- `"use-credentials"`: The video element will send cross-origin requests with credentials.
```jsx
<HoverVideoPlayer
videoSrc="video.mp4"
crossOrigin="use-credentials"
/>
```
## Overlays

@@ -173,0 +191,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc