Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start/Stop Sharing button is not triggered in Screen Sharing VideoJs-record in Angular 10 #208

Open
maneeshrao66 opened this issue May 10, 2021 · 0 comments

Comments

@maneeshrao66
Copy link

I have integrated the videojs-record plugin to share the screen recording with audio in Angular. While doing the recording of screen, I am able to do screen recording but need to click on Start button twice for recording and Stop Sharing button is not triggered. any help? Below is my code.

 <video id="video_{{idx}}" class="video-js vjs-default-skin text-center" playsinline></video>

idx = 'clip1';
   config: any;
   player: any;
   plugin: any;

  constructor() {
     this.setDefaultSetupOfVideo();
  }
  ngAfterViewInit() {
    this.loadVideoSetup();
  }

  loadVideoSetup() {
    // ID with which to access the template's video element
    const el = 'video_' + this.idx;

    // setup the player via the unique element ID
    this.player = videoJs(document.getElementById(el), this.config, () => {
        console.log('player ready! id:', el);

        // print version information at startup
        const msg = 'Using video.js ' + videoJs.VERSION +
            ' with videoJs-record ' + videoJs.getPluginVersion('record') +
            ' and recordrtc ' + RecordRTC.version;
        videoJs.log(msg);
    });

    // device is ready
    this.player.on('deviceReady', () => {
        console.log('device is ready!');
    });

    // user clicked the record button and started recording
    this.player.on('startRecord', () => {
        console.log('started recording!');
    });

    // user completed recording and stream is available
    this.player.on('finishRecord', () => {
        // recordedData is a blob object containing the recorded data that
        // can be downloaded by the user, stored on server etc.
        console.log('finished recording: ', this.player.recordedData);
    });

    // error handling
    this.player.on('error', (element, error) => {
        console.warn(error);
    });
@maneeshrao66 maneeshrao66 changed the title Start/Stop Sharing button is not triggered in Screen Sharing VideoJs-record Start/Stop Sharing button is not triggered in Screen Sharing VideoJs-record in Angular 10 May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant