videojs-record icon indicating copy to clipboard operation
videojs-record copied to clipboard

Support for adding delay before starting a recording

Open stonebeach514 opened this issue 4 years ago • 6 comments

Hi. I tried a way to delay video-only recording but couldn't.I want to delay recording video-only by 5 seconds.I knew I would edit the record-toggle.js if it was audio only . Which file do you edit for video only recoeding?

stonebeach514 avatar Jan 28 '21 04:01 stonebeach514

I knew I would edit the record-toggle.js if it was audio only .

What line would you edit?

thijstriemstra avatar Jan 28 '21 13:01 thijstriemstra

I know that if the delay is audio only, edit line 72 of recorde-toggle.js as follows .

handleClick(event) {
    let recorder = this.player_.record();
    if (!recorder.isRecording()) {
        recorder.start();
    } else {
        recorder.stop();
    }
}

But I don't know where to edit for video-only :'-(

stonebeach514 avatar Feb 10 '21 02:02 stonebeach514

I want to delay recording video-only by 5 seconds.

What is your use-case for this? Trying to understand why you'd need this.

thijstriemstra avatar Feb 10 '21 02:02 thijstriemstra

What is your use-case for this? Trying to understand why you'd need this.

I assume he wants to have a 5-second timer before the recording starts.

@stonebeach514 I did the same for the videojs.record.js file in the dist folder. You can check out #348

@thijstriemstra In saying that, if we edit the src file, should we re-build it? Apologies I'm fairly new to javascript! :(

alberttjc avatar Feb 10 '21 03:02 alberttjc

In saying that, if we edit the src file, should we re-build it? Apologies I'm fairly new to javascript! :(

@alberttjc yes, see https://collab-project.github.io/videojs-record/#/development

thijstriemstra avatar Feb 10 '21 03:02 thijstriemstra

@thijstriemstra yup, cheers mate!

alberttjc avatar Feb 10 '21 04:02 alberttjc