Git Product home page Git Product logo

capture-video-frame's People

Contributors

halidovz avatar ilkkao avatar kclosu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

capture-video-frame's Issues

Feature Request: Wait for readyState

Love your library, nicely written :)

I've used this library a couple of times and found I've need to put some code that involves waiting for readyState === 4. Would be cool that code was part of this as a helper function.

I can make a PR if you let me know if I should use timeouts or promises?

Get an issue using files other than .mp4 (Youtube, streamable)

Whenever I try a video that isn't .mp4 I get an error:

TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'

But this works for .mp4 videos. Any idea whats going on here?

class Player extends React.Component {
	constructor (props) {
  	super(props)
    this.state = {
      url: "https://www.youtube.com/watch?v=oZrA9nQuEOM",
    	playing: false,
      image: null,
      frames: [], 
      captureInterval: 10000, 
      isLoading: false, 
      result: 0
    }  
`....`
  	  <ReactPlayer 
          ref={player => { this.player = player }}
          url={this.state.url}
          playing={this.state.playing}
          width='320px'
          height='180px'
          config={{ file: { attributes: {
            crossorigin: 'anonymous'
          }}}}
        />

captureVideoFrame is not a function.

As I have seen in demo, I have set capture-video-frame.js file in my assets/js/capture-video-frame.js folder and I have load that js from index.js file. In browser I have check that js is load or not. And It's load fine.

I'm using your code in angular 4. And I got error like this.

ERROR TypeError: this.captureVideoFrame is not a function

When I remove this keyword from capturteVideoFrame , then it shows error with red underline.

The error message is this. -> Cannot find name 'captureVideoFrame'.

Error running code

First of all pls pardon me as i'm a novice programmer.

When i run the code and log the value of frame, it seems that there is no data embedded within the frame. Am i missing something?

{blob: Blob, dataUri: "data:,", format: "png"}
blob
:
Blob {size: 0, type: ","}
dataUri
:
"data:,"
format
:
"png"
proto
:
Object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.