saveytbvideo

1.0.2 • Public • Published

exports.download = async (req, res, next) => {

try {
    let id = '2MoGxae-zyo'; //id of youtube video
    let saveYtbVideo = new SaveYtbVideo(id);
    saveYtbVideo.path = './public';  //path to store video
    // saveYtbVideo.saveVideo()
    const [error, result] = await to(saveYtbVideo.saveVideo({
        splits: [
            {startTime: 37, duration: 806}
        ]
    }));

} catch (err) {
    next(err);
}

}

Readme

Keywords

none

Package Sidebar

Install

npm i saveytbvideo

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

8.1 kB

Total Files

3

Last publish

Collaborators

  • phungbaluan