You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am uploading the h264 file from my local computer. The video plays well but does not play for the full time. Like i had 59.55mins data but the files play for like 30 sec or 2mins 30sec. Iam using the source code of the live demo of the repository. Can you please help me with this?
This is my script file :-
<script>
window.onload = function () {
debugger
document.getElementById('play-btn').addEventListener('click', function (e) {
if (jmuxer) {
jmuxer.destroy();
}
var file = document.getElementById('h264_file');
if (!file.files.length) {
alert('Please choose a file.');
return;
}
var fps = parseInt(document.getElementById('fps-input').value) || 1;
reader.readAsArrayBuffer(file.files[0]);
jmuxer = new JMuxer({
node: 'player',
mode: 'video',
flushingTime: 0,
fps: fps,
clearBuffer: true,
debug: true,
readFpsFromTrack : true
});
}, false);
var jmuxer, duration = 3600000;
var reader = new FileReader();
reader.onload = function (e) {
console.log('File read successfully:', new Uint8Array(e.target.result));
jmuxer.feed({
video: new Uint8Array(e.target.result),
duration : duration
});
console.log(jmuxer)
};
}
</script>
@samirkumardas, Yes Absolutely! The functionality also works the same way, but the only thing is Iam getting lesser chunks of data say 9000000, then the chunks of the data if i upload demo.h264.
I am uploading the h264 file from my local computer. The video plays well but does not play for the full time. Like i had 59.55mins data but the files play for like 30 sec or 2mins 30sec. Iam using the source code of the live demo of the repository. Can you please help me with this?
This is my script file :-
<script>
window.onload = function () {
debugger
document.getElementById('play-btn').addEventListener('click', function (e) {
if (jmuxer) {
jmuxer.destroy();
}
var file = document.getElementById('h264_file');
if (!file.files.length) {
alert('Please choose a file.');
return;
}
var fps = parseInt(document.getElementById('fps-input').value) || 1;
reader.readAsArrayBuffer(file.files[0]);
jmuxer = new JMuxer({
node: 'player',
mode: 'video',
flushingTime: 0,
fps: fps,
clearBuffer: true,
debug: true,
readFpsFromTrack : true
});
}, false);
var jmuxer, duration = 3600000;
var reader = new FileReader();
reader.onload = function (e) {
console.log('File read successfully:', new Uint8Array(e.target.result));
jmuxer.feed({
video: new Uint8Array(e.target.result),
duration : duration
});
console.log(jmuxer)
};
}
</script>
The text was updated successfully, but these errors were encountered: