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

Error Recording as Mirror Mode #687

Open
smilemittal opened this issue Jun 20, 2023 · 1 comment
Open

Error Recording as Mirror Mode #687

smilemittal opened this issue Jun 20, 2023 · 1 comment
Labels

Comments

@smilemittal
Copy link

Description

it is showing mirror mode for the front camera on the phone and also on the laptop cam.

Steps to reproduce

Options object 
            options: {
                controls: true,
                autoplay: true,
                fluid: false,
                loop: false,
                width: 540,
                height: 360,
                DeviceButton: true,
                bigPlayButton: true,
                controlBar: {
                    deviceButton: false,
                    recordToggle: false,
                    pipToggle: false,
                    fullscreenToggle: true,
                },
                plugins: {
                    record: {
                        image: {
                            facingMode: 'user'
                        },
                        pip: false,
                        audio: true,
                        video: true,
                        maxLength: 90,
                        debug: true
                    }
                }
            },

 this.player = videojs('#myVideo', this.options, () => {
            // print version information at startup
            let msg = 'Using video.js ' + videojs.VERSION +
                ' with videojs-record ' + videojs.getPluginVersion('record') +
                ' and recordrtc ' + RecordRTC.version;
            videojs.log(msg);
        });

        this.player.one('deviceReady', () => {
            this.player.record().enumerateDevices();
        });

        // this.player.on('startRecord', function () {
        //     console.log('started recording!');
        // });

        this.player.on('finishRecord', () => {
            console.log('finishRecord');
            this.submitVideo();
        });

        this.player.on('error', (element, error) => {
            console.log(element, error);
        });

        this.player.on('enumerateReady', () => {
            this.devices = this.player.record().devices;
            let deviceInfo, i;
            this.videoDevices = [];
            for (i = 0; i < this.devices.length; ++i) {
                deviceInfo = this.devices[i];
                if (deviceInfo.kind === 'videoinput') {
                    this.videoDevices.push(this.devices[i]);
                }
            }
            if (this.videoDevices.length > 1) {
                this.deviceId = this.videoDevices[0].deviceId;
                this.player.record().setVideoInput(this.deviceId);
                this.isSwitchCamera = false;
            }
        });
        this.player.record().getDevice();

Using vue 3 + laravel

@smilemittal
Copy link
Author

smilemittal commented Jun 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants