Socket
Socket
Sign inDemoInstall

react-hover-video-player

Package Overview
Dependencies
5
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.7.0 to 9.7.1

2

dist/HoverVideoPlayer.types.d.ts

@@ -189,3 +189,3 @@ /// <reference types="react" />

*
* @defaultValue "anonymous"
* @defaultValue null
*/

@@ -192,0 +192,0 @@ crossOrigin?: 'anonymous' | 'use-credentials';

@@ -391,3 +391,3 @@ import React, { useEffect, useRef, useMemo, useState, useImperativeHandle } from 'react';

function HoverVideoPlayer(_a) {
var videoSrc = _a.videoSrc, _b = _a.videoCaptions, videoCaptions = _b === void 0 ? null : _b, _c = _a.focused, focused = _c === void 0 ? false : _c, _d = _a.disableDefaultEventHandling, disableDefaultEventHandling = _d === void 0 ? false : _d, _e = _a.hoverTarget, hoverTarget = _e === void 0 ? null : _e, _f = _a.onHoverStart, onHoverStart = _f === void 0 ? null : _f, _g = _a.onHoverEnd, onHoverEnd = _g === void 0 ? null : _g, _h = _a.hoverOverlay, hoverOverlay = _h === void 0 ? null : _h, _j = _a.pausedOverlay, pausedOverlay = _j === void 0 ? null : _j, _k = _a.loadingOverlay, loadingOverlay = _k === void 0 ? null : _k, _l = _a.loadingStateTimeout, loadingStateTimeout = _l === void 0 ? 200 : _l, _m = _a.overlayTransitionDuration, overlayTransitionDuration = _m === void 0 ? 400 : _m, _o = _a.playbackStartDelay, playbackStartDelay = _o === void 0 ? 0 : _o, _p = _a.restartOnPaused, restartOnPaused = _p === void 0 ? false : _p, _q = _a.unloadVideoOnPaused, unloadVideoOnPaused = _q === void 0 ? false : _q, _r = _a.playbackRangeStart, playbackRangeStart = _r === void 0 ? null : _r, _s = _a.playbackRangeEnd, playbackRangeEnd = _s === void 0 ? null : _s, _t = _a.muted, muted = _t === void 0 ? true : _t, _u = _a.volume, volume = _u === void 0 ? 1 : _u, _v = _a.loop, loop = _v === void 0 ? true : _v, _w = _a.preload, preload = _w === void 0 ? null : _w, _x = _a.crossOrigin, crossOrigin = _x === void 0 ? 'anonymous' : _x, _y = _a.controls, controls = _y === void 0 ? false : _y, _z = _a.controlsList, controlsList = _z === void 0 ? null : _z, _0 = _a.disableRemotePlayback, disableRemotePlayback = _0 === void 0 ? true : _0, _1 = _a.disablePictureInPicture, disablePictureInPicture = _1 === void 0 ? true : _1, _2 = _a.style, style = _2 === void 0 ? null : _2, _3 = _a.hoverOverlayWrapperClassName, hoverOverlayWrapperClassName = _3 === void 0 ? null : _3, _4 = _a.hoverOverlayWrapperStyle, hoverOverlayWrapperStyle = _4 === void 0 ? null : _4, _5 = _a.pausedOverlayWrapperClassName, pausedOverlayWrapperClassName = _5 === void 0 ? null : _5, _6 = _a.pausedOverlayWrapperStyle, pausedOverlayWrapperStyle = _6 === void 0 ? null : _6, _7 = _a.loadingOverlayWrapperClassName, loadingOverlayWrapperClassName = _7 === void 0 ? null : _7, _8 = _a.loadingOverlayWrapperStyle, loadingOverlayWrapperStyle = _8 === void 0 ? null : _8, _9 = _a.videoId, videoId = _9 === void 0 ? null : _9, _10 = _a.videoClassName, videoClassName = _10 === void 0 ? null : _10, _11 = _a.videoRef, forwardedVideoRef = _11 === void 0 ? null : _11, _12 = _a.videoStyle, videoStyle = _12 === void 0 ? null : _12, _13 = _a.sizingMode, sizingMode = _13 === void 0 ? 'video' : _13, _14 = _a.shouldSuppressPlaybackInterruptedErrors, shouldSuppressPlaybackInterruptedErrors = _14 === void 0 ? true : _14, spreadableProps = __rest(_a, ["videoSrc", "videoCaptions", "focused", "disableDefaultEventHandling", "hoverTarget", "onHoverStart", "onHoverEnd", "hoverOverlay", "pausedOverlay", "loadingOverlay", "loadingStateTimeout", "overlayTransitionDuration", "playbackStartDelay", "restartOnPaused", "unloadVideoOnPaused", "playbackRangeStart", "playbackRangeEnd", "muted", "volume", "loop", "preload", "crossOrigin", "controls", "controlsList", "disableRemotePlayback", "disablePictureInPicture", "style", "hoverOverlayWrapperClassName", "hoverOverlayWrapperStyle", "pausedOverlayWrapperClassName", "pausedOverlayWrapperStyle", "loadingOverlayWrapperClassName", "loadingOverlayWrapperStyle", "videoId", "videoClassName", "videoRef", "videoStyle", "sizingMode", "shouldSuppressPlaybackInterruptedErrors"]);
var videoSrc = _a.videoSrc, _b = _a.videoCaptions, videoCaptions = _b === void 0 ? null : _b, _c = _a.focused, focused = _c === void 0 ? false : _c, _d = _a.disableDefaultEventHandling, disableDefaultEventHandling = _d === void 0 ? false : _d, _e = _a.hoverTarget, hoverTarget = _e === void 0 ? null : _e, _f = _a.onHoverStart, onHoverStart = _f === void 0 ? null : _f, _g = _a.onHoverEnd, onHoverEnd = _g === void 0 ? null : _g, _h = _a.hoverOverlay, hoverOverlay = _h === void 0 ? null : _h, _j = _a.pausedOverlay, pausedOverlay = _j === void 0 ? null : _j, _k = _a.loadingOverlay, loadingOverlay = _k === void 0 ? null : _k, _l = _a.loadingStateTimeout, loadingStateTimeout = _l === void 0 ? 200 : _l, _m = _a.overlayTransitionDuration, overlayTransitionDuration = _m === void 0 ? 400 : _m, _o = _a.playbackStartDelay, playbackStartDelay = _o === void 0 ? 0 : _o, _p = _a.restartOnPaused, restartOnPaused = _p === void 0 ? false : _p, _q = _a.unloadVideoOnPaused, unloadVideoOnPaused = _q === void 0 ? false : _q, _r = _a.playbackRangeStart, playbackRangeStart = _r === void 0 ? null : _r, _s = _a.playbackRangeEnd, playbackRangeEnd = _s === void 0 ? null : _s, _t = _a.muted, muted = _t === void 0 ? true : _t, _u = _a.volume, volume = _u === void 0 ? 1 : _u, _v = _a.loop, loop = _v === void 0 ? true : _v, _w = _a.preload, preload = _w === void 0 ? null : _w, _x = _a.crossOrigin, crossOrigin = _x === void 0 ? null : _x, _y = _a.controls, controls = _y === void 0 ? false : _y, _z = _a.controlsList, controlsList = _z === void 0 ? null : _z, _0 = _a.disableRemotePlayback, disableRemotePlayback = _0 === void 0 ? true : _0, _1 = _a.disablePictureInPicture, disablePictureInPicture = _1 === void 0 ? true : _1, _2 = _a.style, style = _2 === void 0 ? null : _2, _3 = _a.hoverOverlayWrapperClassName, hoverOverlayWrapperClassName = _3 === void 0 ? null : _3, _4 = _a.hoverOverlayWrapperStyle, hoverOverlayWrapperStyle = _4 === void 0 ? null : _4, _5 = _a.pausedOverlayWrapperClassName, pausedOverlayWrapperClassName = _5 === void 0 ? null : _5, _6 = _a.pausedOverlayWrapperStyle, pausedOverlayWrapperStyle = _6 === void 0 ? null : _6, _7 = _a.loadingOverlayWrapperClassName, loadingOverlayWrapperClassName = _7 === void 0 ? null : _7, _8 = _a.loadingOverlayWrapperStyle, loadingOverlayWrapperStyle = _8 === void 0 ? null : _8, _9 = _a.videoId, videoId = _9 === void 0 ? null : _9, _10 = _a.videoClassName, videoClassName = _10 === void 0 ? null : _10, _11 = _a.videoRef, forwardedVideoRef = _11 === void 0 ? null : _11, _12 = _a.videoStyle, videoStyle = _12 === void 0 ? null : _12, _13 = _a.sizingMode, sizingMode = _13 === void 0 ? 'video' : _13, _14 = _a.shouldSuppressPlaybackInterruptedErrors, shouldSuppressPlaybackInterruptedErrors = _14 === void 0 ? true : _14, spreadableProps = __rest(_a, ["videoSrc", "videoCaptions", "focused", "disableDefaultEventHandling", "hoverTarget", "onHoverStart", "onHoverEnd", "hoverOverlay", "pausedOverlay", "loadingOverlay", "loadingStateTimeout", "overlayTransitionDuration", "playbackStartDelay", "restartOnPaused", "unloadVideoOnPaused", "playbackRangeStart", "playbackRangeEnd", "muted", "volume", "loop", "preload", "crossOrigin", "controls", "controlsList", "disableRemotePlayback", "disablePictureInPicture", "style", "hoverOverlayWrapperClassName", "hoverOverlayWrapperStyle", "pausedOverlayWrapperClassName", "pausedOverlayWrapperStyle", "loadingOverlayWrapperClassName", "loadingOverlayWrapperStyle", "videoId", "videoClassName", "videoRef", "videoStyle", "sizingMode", "shouldSuppressPlaybackInterruptedErrors"]);
// Element refs

@@ -394,0 +394,0 @@ var containerRef = useRef(null);

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

function HoverVideoPlayer(_a) {
var videoSrc = _a.videoSrc, _b = _a.videoCaptions, videoCaptions = _b === void 0 ? null : _b, _c = _a.focused, focused = _c === void 0 ? false : _c, _d = _a.disableDefaultEventHandling, disableDefaultEventHandling = _d === void 0 ? false : _d, _e = _a.hoverTarget, hoverTarget = _e === void 0 ? null : _e, _f = _a.onHoverStart, onHoverStart = _f === void 0 ? null : _f, _g = _a.onHoverEnd, onHoverEnd = _g === void 0 ? null : _g, _h = _a.hoverOverlay, hoverOverlay = _h === void 0 ? null : _h, _j = _a.pausedOverlay, pausedOverlay = _j === void 0 ? null : _j, _k = _a.loadingOverlay, loadingOverlay = _k === void 0 ? null : _k, _l = _a.loadingStateTimeout, loadingStateTimeout = _l === void 0 ? 200 : _l, _m = _a.overlayTransitionDuration, overlayTransitionDuration = _m === void 0 ? 400 : _m, _o = _a.playbackStartDelay, playbackStartDelay = _o === void 0 ? 0 : _o, _p = _a.restartOnPaused, restartOnPaused = _p === void 0 ? false : _p, _q = _a.unloadVideoOnPaused, unloadVideoOnPaused = _q === void 0 ? false : _q, _r = _a.playbackRangeStart, playbackRangeStart = _r === void 0 ? null : _r, _s = _a.playbackRangeEnd, playbackRangeEnd = _s === void 0 ? null : _s, _t = _a.muted, muted = _t === void 0 ? true : _t, _u = _a.volume, volume = _u === void 0 ? 1 : _u, _v = _a.loop, loop = _v === void 0 ? true : _v, _w = _a.preload, preload = _w === void 0 ? null : _w, _x = _a.crossOrigin, crossOrigin = _x === void 0 ? 'anonymous' : _x, _y = _a.controls, controls = _y === void 0 ? false : _y, _z = _a.controlsList, controlsList = _z === void 0 ? null : _z, _0 = _a.disableRemotePlayback, disableRemotePlayback = _0 === void 0 ? true : _0, _1 = _a.disablePictureInPicture, disablePictureInPicture = _1 === void 0 ? true : _1, _2 = _a.style, style = _2 === void 0 ? null : _2, _3 = _a.hoverOverlayWrapperClassName, hoverOverlayWrapperClassName = _3 === void 0 ? null : _3, _4 = _a.hoverOverlayWrapperStyle, hoverOverlayWrapperStyle = _4 === void 0 ? null : _4, _5 = _a.pausedOverlayWrapperClassName, pausedOverlayWrapperClassName = _5 === void 0 ? null : _5, _6 = _a.pausedOverlayWrapperStyle, pausedOverlayWrapperStyle = _6 === void 0 ? null : _6, _7 = _a.loadingOverlayWrapperClassName, loadingOverlayWrapperClassName = _7 === void 0 ? null : _7, _8 = _a.loadingOverlayWrapperStyle, loadingOverlayWrapperStyle = _8 === void 0 ? null : _8, _9 = _a.videoId, videoId = _9 === void 0 ? null : _9, _10 = _a.videoClassName, videoClassName = _10 === void 0 ? null : _10, _11 = _a.videoRef, forwardedVideoRef = _11 === void 0 ? null : _11, _12 = _a.videoStyle, videoStyle = _12 === void 0 ? null : _12, _13 = _a.sizingMode, sizingMode = _13 === void 0 ? 'video' : _13, _14 = _a.shouldSuppressPlaybackInterruptedErrors, shouldSuppressPlaybackInterruptedErrors = _14 === void 0 ? true : _14, spreadableProps = __rest(_a, ["videoSrc", "videoCaptions", "focused", "disableDefaultEventHandling", "hoverTarget", "onHoverStart", "onHoverEnd", "hoverOverlay", "pausedOverlay", "loadingOverlay", "loadingStateTimeout", "overlayTransitionDuration", "playbackStartDelay", "restartOnPaused", "unloadVideoOnPaused", "playbackRangeStart", "playbackRangeEnd", "muted", "volume", "loop", "preload", "crossOrigin", "controls", "controlsList", "disableRemotePlayback", "disablePictureInPicture", "style", "hoverOverlayWrapperClassName", "hoverOverlayWrapperStyle", "pausedOverlayWrapperClassName", "pausedOverlayWrapperStyle", "loadingOverlayWrapperClassName", "loadingOverlayWrapperStyle", "videoId", "videoClassName", "videoRef", "videoStyle", "sizingMode", "shouldSuppressPlaybackInterruptedErrors"]);
var videoSrc = _a.videoSrc, _b = _a.videoCaptions, videoCaptions = _b === void 0 ? null : _b, _c = _a.focused, focused = _c === void 0 ? false : _c, _d = _a.disableDefaultEventHandling, disableDefaultEventHandling = _d === void 0 ? false : _d, _e = _a.hoverTarget, hoverTarget = _e === void 0 ? null : _e, _f = _a.onHoverStart, onHoverStart = _f === void 0 ? null : _f, _g = _a.onHoverEnd, onHoverEnd = _g === void 0 ? null : _g, _h = _a.hoverOverlay, hoverOverlay = _h === void 0 ? null : _h, _j = _a.pausedOverlay, pausedOverlay = _j === void 0 ? null : _j, _k = _a.loadingOverlay, loadingOverlay = _k === void 0 ? null : _k, _l = _a.loadingStateTimeout, loadingStateTimeout = _l === void 0 ? 200 : _l, _m = _a.overlayTransitionDuration, overlayTransitionDuration = _m === void 0 ? 400 : _m, _o = _a.playbackStartDelay, playbackStartDelay = _o === void 0 ? 0 : _o, _p = _a.restartOnPaused, restartOnPaused = _p === void 0 ? false : _p, _q = _a.unloadVideoOnPaused, unloadVideoOnPaused = _q === void 0 ? false : _q, _r = _a.playbackRangeStart, playbackRangeStart = _r === void 0 ? null : _r, _s = _a.playbackRangeEnd, playbackRangeEnd = _s === void 0 ? null : _s, _t = _a.muted, muted = _t === void 0 ? true : _t, _u = _a.volume, volume = _u === void 0 ? 1 : _u, _v = _a.loop, loop = _v === void 0 ? true : _v, _w = _a.preload, preload = _w === void 0 ? null : _w, _x = _a.crossOrigin, crossOrigin = _x === void 0 ? null : _x, _y = _a.controls, controls = _y === void 0 ? false : _y, _z = _a.controlsList, controlsList = _z === void 0 ? null : _z, _0 = _a.disableRemotePlayback, disableRemotePlayback = _0 === void 0 ? true : _0, _1 = _a.disablePictureInPicture, disablePictureInPicture = _1 === void 0 ? true : _1, _2 = _a.style, style = _2 === void 0 ? null : _2, _3 = _a.hoverOverlayWrapperClassName, hoverOverlayWrapperClassName = _3 === void 0 ? null : _3, _4 = _a.hoverOverlayWrapperStyle, hoverOverlayWrapperStyle = _4 === void 0 ? null : _4, _5 = _a.pausedOverlayWrapperClassName, pausedOverlayWrapperClassName = _5 === void 0 ? null : _5, _6 = _a.pausedOverlayWrapperStyle, pausedOverlayWrapperStyle = _6 === void 0 ? null : _6, _7 = _a.loadingOverlayWrapperClassName, loadingOverlayWrapperClassName = _7 === void 0 ? null : _7, _8 = _a.loadingOverlayWrapperStyle, loadingOverlayWrapperStyle = _8 === void 0 ? null : _8, _9 = _a.videoId, videoId = _9 === void 0 ? null : _9, _10 = _a.videoClassName, videoClassName = _10 === void 0 ? null : _10, _11 = _a.videoRef, forwardedVideoRef = _11 === void 0 ? null : _11, _12 = _a.videoStyle, videoStyle = _12 === void 0 ? null : _12, _13 = _a.sizingMode, sizingMode = _13 === void 0 ? 'video' : _13, _14 = _a.shouldSuppressPlaybackInterruptedErrors, shouldSuppressPlaybackInterruptedErrors = _14 === void 0 ? true : _14, spreadableProps = __rest(_a, ["videoSrc", "videoCaptions", "focused", "disableDefaultEventHandling", "hoverTarget", "onHoverStart", "onHoverEnd", "hoverOverlay", "pausedOverlay", "loadingOverlay", "loadingStateTimeout", "overlayTransitionDuration", "playbackStartDelay", "restartOnPaused", "unloadVideoOnPaused", "playbackRangeStart", "playbackRangeEnd", "muted", "volume", "loop", "preload", "crossOrigin", "controls", "controlsList", "disableRemotePlayback", "disablePictureInPicture", "style", "hoverOverlayWrapperClassName", "hoverOverlayWrapperStyle", "pausedOverlayWrapperClassName", "pausedOverlayWrapperStyle", "loadingOverlayWrapperClassName", "loadingOverlayWrapperStyle", "videoId", "videoClassName", "videoRef", "videoStyle", "sizingMode", "shouldSuppressPlaybackInterruptedErrors"]);
// Element refs

@@ -400,0 +400,0 @@ var containerRef = React.useRef(null);

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

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

@@ -162,11 +162,13 @@ # React Hover Video Player

**Type**: `string` | **Default**: `"anonymous"`
**Type**: `string` | **Default**: `null`
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:
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, but if you are having trouble with CORS a good first step may be to try setting it to `"anonymous"`.
- `"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.
The acceptable values are:
- `"anonymous"`: The video element will send cross-origin requests with no credentials.
- `"use-credentials"`: The video element will send cross-origin requests with credentials.
```jsx
<HoverVideoPlayer videoSrc="video.mp4" crossOrigin="use-credentials" />
<HoverVideoPlayer videoSrc="video.mp4" crossOrigin="anonymous" />
```

@@ -173,0 +175,0 @@

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc