Output blob size is 0 on Chrome when recording audio
See original GitHub issueDescription
When I try to record video + audio on Chrome the output blob for video has no data and there is no audio blob at all. It outputs a 2 MB blob if recording video-only, but when I set audio: true
in the videojs options
object, the output video blob is 0 MB. There is also no audio blob in the output.
Your audio-video demo also seems to have the same issue:
Steps to reproduce
This is my setup:
const player = videojs('video-player', {
// video.js options
controls: true,
loop: false,
width: $('#video-container').width() || 320,
height: $('#video-container').height() || 240,
plugins: {
// videojs-record plugin options
record: {
maxLength: 5,
debug: true,
audio: true, /* only works when this is false */
video: {
// video constraints: set resolution of camera
mandatory: {
minWidth: 1280,
minHeight: 720,
},
},
// dimensions of captured video frames
frameWidth: 1280,
frameHeight: 720
}
}
});
// error handling
player.on('deviceError', function() {
console.log('device error:', player.deviceErrorCode);
});
player.on('error', function(error) {
console.log('error:', error);
});
// user clicked the record button and started recording
player.on('startRecord', function() {
console.log('started recording!');
});
// user completed recording and stream is available
player.on('finishRecord', function() {
// the blob object contains the recorded data that
// can be downloaded by the user, stored on server etc.
debugger
console.log('finished recording: ', player.recordedData);
});
Results
Expected
I’m expecting to see an object with a video and audio blob of an appropriate size for a 5s video/audio recording.
Actual
The video blob has a size of 0 and there is no audio blob.
Error output
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
videojs 5.16.0
browsers
Chrome 56
OSes
MacOS 10.12.3
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top GitHub Comments
@thijstriemstra kind of have to agree with you here… We’ve seen this bug appear very sporadically. If we could figure out a way of reproducing then it would be a different story.
In any case, I think this bug probably stems from RecordRTC. So for anyone interested in getting this fixed, I’d refer to the RecordRTC issues instead. https://github.com/muaz-khan/RecordRTC
I can add that I’ve seen this as well in our live environment. But since I don’t know how to reproduce it I just don’t know where to begin…