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 0.0.5 to 0.0.6

6

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

@@ -11,2 +11,3 @@ status: VideoStatus;

buffered: number;
isMuted: boolean;
}

@@ -39,2 +40,3 @@ export declare type NavigateFunction = (time: number) => void;

buffered: number;
isMuted: boolean;
}

@@ -49,3 +51,3 @@ export declare class Video extends Component<VideoProps, VideoComponentState> {

onCanPlay: (e: any) => void;
onPlay: (e: any) => void;
onPlay: () => void;
onPause: (e: any) => void;

@@ -52,0 +54,0 @@ readonly videoState: VideoState;

@@ -16,2 +16,10 @@ "use strict";

var utils_1 = require("./utils");
var getVolumeFromVideo = function (video) {
var volume = video.volume;
var isMuted = volume === 0;
return {
volume: volume,
isMuted: isMuted
};
};
var Video = (function (_super) {

@@ -24,10 +32,13 @@ __extends(Video, _super);

currentTime: 0,
volume: 0,
volume: 1,
status: 'paused',
duration: 0
duration: 0,
isMuted: false
};
_this.onVolumeChange = function (e) {
var video = e.target;
var _a = getVolumeFromVideo(video), volume = _a.volume, isMuted = _a.isMuted;
_this.setState({
volume: video.volume
volume: volume,
isMuted: isMuted
});

@@ -47,9 +58,11 @@ };

var video = e.target;
var _a = getVolumeFromVideo(video), volume = _a.volume, isMuted = _a.isMuted;
_this.setState({
volume: volume,
isMuted: isMuted,
currentTime: video.currentTime,
volume: video.volume,
duration: video.duration
});
};
_this.onPlay = function (e) {
_this.onPlay = function () {
_this.setState({

@@ -129,3 +142,3 @@ status: 'playing'

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

@@ -136,3 +149,4 @@ currentTime: currentTime,

duration: duration,
buffered: buffered
buffered: buffered,
isMuted: isMuted
};

@@ -139,0 +153,0 @@ },

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

@@ -11,2 +11,3 @@ "repository": "git@github.com:zzarcon/react-video-renderer.git",

"@atlaskit/icon": "^11.0.0",
"@atlaskit/single-select": "^4.0.3",
"ts-react-toolbox": "^0.0.46"

@@ -13,0 +14,0 @@ },

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