agsh / rtsp-ffmpeg

Node.js FFMpeg wrapper for streaming RTSP into MotionJPEG
MIT License
249 stars 84 forks source link

Object.observer error #11

Closed Wifsimster closed 7 years ago

Wifsimster commented 7 years ago

Hi,

Latest ffmpeg is correctly install and i have this if i require rtsp-ffmpeg on my server.js. Any idea ?

C:\...\node_modules\rtsp-ffmpeg\lib\rtsp
-ffmpeg.js:34
                Object.observe(this, observer.bind(this));
                       ^

TypeError: Object.observe is not a function
    at new FFMpeg (C:\Users\Wifsimster\Documents\GitHub\overwatch\node_modules\r
tsp-ffmpeg\lib\rtsp-ffmpeg.js:34:10)
    at Object.<anonymous> (C:\Users\Wifsimster\Documents\GitHub\overwatch\server
.js:39:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
agsh commented 7 years ago

For now you can downgrade your version of node.js because Object.observe method is now deprecated. I'll rewrite this code to Proxy object when I have free time.

hklsk commented 7 years ago

one possible solution

npm install object.observe
import objectObserve from 'object.observe';
agsh commented 7 years ago

@Wifsimster I've made changes and fixed some bugs. Please check this out.

Seikon commented 7 years ago

Now it works for recent versions, can we close this issue?

Wifsimster commented 7 years ago

@agsh Thanks for the update, i will try to take some time to test this ;)