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

react-video-renderer

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-video-renderer - npm Package Compare versions

Comparing version 2.1.2 to 2.2.1

5

dist/video.d.ts

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

export interface VideoProps {
sourceType?: 'video' | 'audio';
src: string;

@@ -48,3 +49,3 @@ children: RenderCallback;

export declare class Video extends Component<VideoProps, VideoComponentState> {
videoElement: HTMLVideoElement;
videoElement: HTMLVideoElement | HTMLAudioElement;
state: VideoComponentState;

@@ -69,3 +70,3 @@ constructor(props: VideoProps);

readonly actions: VideoActions;
saveVideoRef: (element: HTMLVideoElement) => void;
savePlayableMediaRef: (element: any) => void;
onDurationChange: (e: any) => void;

@@ -72,0 +73,0 @@ onError: (e: any) => void;

17

dist/video.js

@@ -73,3 +73,2 @@ "use strict";

_this.onPause = function (e) {
var video = e.target;
_this.setState({

@@ -94,3 +93,6 @@ status: 'paused'

_this.requestFullscreen = function () {
utils_1.requestFullScreen(_this.videoElement);
var sourceType = _this.props.sourceType;
if (sourceType === 'video') {
utils_1.requestFullScreen(_this.videoElement);
}
};

@@ -112,3 +114,3 @@ _this.mute = function () {

};
_this.saveVideoRef = function (element) {
_this.savePlayableMediaRef = function (element) {
if (!element) {

@@ -136,3 +138,4 @@ return;

};
_this.videoElement = document.createElement('video');
var sourceType = props.sourceType;
_this.videoElement = document.createElement(sourceType || 'video');
return _this;

@@ -187,6 +190,8 @@ }

var _a = this, videoState = _a.videoState, actions = _a.actions;
var _b = this.props, src = _b.src, children = _b.children, autoPlay = _b.autoPlay, controls = _b.controls, preload = _b.preload;
return children(React.createElement("video", { ref: this.saveVideoRef, src: src, preload: preload, controls: controls, autoPlay: autoPlay, onPlay: this.onPlay, onPause: this.onPause, onVolumeChange: this.onVolumeChange, onTimeUpdate: this.onTimeUpdate, onCanPlay: this.onCanPlay, onDurationChange: this.onDurationChange, onError: this.onError, onWaiting: this.onWaiting }), videoState, actions);
var _b = this.props, sourceType = _b.sourceType, src = _b.src, children = _b.children, autoPlay = _b.autoPlay, controls = _b.controls, preload = _b.preload;
var TagName = sourceType || 'video';
return children(React.createElement(TagName, { ref: this.savePlayableMediaRef, src: src, preload: preload, controls: controls, autoPlay: autoPlay, onPlay: this.onPlay, onPause: this.onPause, onVolumeChange: this.onVolumeChange, onTimeUpdate: this.onTimeUpdate, onCanPlay: this.onCanPlay, onDurationChange: this.onDurationChange, onError: this.onError, onWaiting: this.onWaiting }), videoState, actions);
};
Video.defaultProps = {
sourceType: 'video',
autoPlay: false,

@@ -193,0 +198,0 @@ controls: false,

{
"name": "react-video-renderer",
"version": "2.1.2",
"version": "2.2.1",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "repository": "git@github.com:zzarcon/react-video-renderer.git",

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