-
-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
Description
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