node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

remove VM-Dependency

Open TimeForANinja opened this issue 3 years ago • 4 comments

Replace the VM-Dependency added in #1022 by switching to a Script like descriped in https://github.com/fent/node-ytdl-core/pull/1022#issuecomment-957354275

TimeForANinja avatar Dec 16 '21 06:12 TimeForANinja

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 12:04 stale[bot]

I'm keeping an eye on this one. I'm successfully using ytdl-core in reactnative by patching a few of the dependencies as shown here: https://github.com/fullerlee/react-native-ytdl

However, I've encountered the throttled downloads. Merging in the new sig.js results in a new dependency of vm, and I've not been able to sensibly patch that one.

If anyone has any ideas on how I might patch it, or replace the dynamic script creation, I'd be most grateful!

fullerlee avatar May 12 '22 20:05 fullerlee

i mean it should be enough to replace new vm.Script(xxx) in sig.js with an eval(xxx) call

TimeForANinja avatar May 13 '22 08:05 TimeForANinja

i mean it should be enough to replace new vm.Script(xxx) in sig.js with an eval(xxx) call

That's exactly what I've done to make it react-native compatible. Albeit by patching vm-browserify. It's a work-in-progress, but see https://github.com/fullerlee/react-native-ytdl/blob/master/lib/REACT_NATIVE_YTDL_CUSTOM_MODULES/vm/index.js

fullerlee avatar May 13 '22 09:05 fullerlee