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 1.1.2 to 2.0.1

5

dist/video.d.ts
/// <reference types="react" />
import * as React from 'react';
import { Component, ReactNode } from 'react';
export declare type VideoStatus = 'loading' | 'playing' | 'paused' | 'errored';
export declare type VideoStatus = 'playing' | 'paused' | 'errored';
export declare type VideoError = MediaError | null;

@@ -13,2 +13,3 @@ export interface VideoState {

isMuted: boolean;
isLoading: boolean;
error?: VideoError;

@@ -43,2 +44,3 @@ }

isMuted: boolean;
isLoading: boolean;
error?: VideoError;

@@ -48,3 +50,2 @@ }

videoElement: HTMLVideoElement;
statusBeforeLoading?: VideoStatus;
state: VideoComponentState;

@@ -51,0 +52,0 @@ constructor(props: VideoProps);

16

dist/video.js

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

_this.state = {
isLoading: true,
buffered: 0,

@@ -57,5 +58,2 @@ currentTime: 0,

var video = e.target;
var currentStatus = _this.state.status;
var statusBeforeLoading = _this.statusBeforeLoading;
var status = currentStatus === 'loading' && statusBeforeLoading ? statusBeforeLoading : currentStatus;
var _a = getVolumeFromVideo(video), volume = _a.volume, isMuted = _a.isMuted;

@@ -65,3 +63,3 @@ _this.setState({

isMuted: isMuted,
status: status,
isLoading: false,
currentTime: video.currentTime,

@@ -129,2 +127,3 @@ duration: video.duration

_this.setState({
isLoading: false,
status: 'errored',

@@ -135,7 +134,3 @@ error: video.error

_this.onWaiting = function () {
var status = _this.state.status;
_this.statusBeforeLoading = status;
_this.setState({
status: 'loading'
});
_this.setState({ isLoading: true });
};

@@ -158,3 +153,3 @@ _this.videoElement = document.createElement('video');

get: function () {
var _a = this.state, currentTime = _a.currentTime, volume = _a.volume, status = _a.status, duration = _a.duration, buffered = _a.buffered, isMuted = _a.isMuted, error = _a.error;
var _a = this.state, currentTime = _a.currentTime, volume = _a.volume, status = _a.status, duration = _a.duration, buffered = _a.buffered, isMuted = _a.isMuted, isLoading = _a.isLoading, error = _a.error;
return {

@@ -167,2 +162,3 @@ currentTime: currentTime,

isMuted: isMuted,
isLoading: isLoading,
error: error

@@ -169,0 +165,0 @@ };

{
"name": "react-video-renderer",
"version": "1.1.2",
"version": "2.0.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