collab-project / videojs-record

video.js plugin for recording audio/video/image files
https://collab-project.github.io/videojs-record
MIT License
1.4k stars 315 forks source link

Encountering "Uncaught (in promise) TypeError: cannot read properties of undefined (reading 'dataEnd')" error with the videosjs.record.ts-ebml.js plugin on Android devices, causing the application to freeze #691

Closed Darja16 closed 1 year ago

Darja16 commented 1 year ago

Description

We have been using video.js extensively on desktop browsers without any issues. However, when expanding our support to mobile devices, particularly Android, we encountered a critical problem related to the videosjs.record.ts-ebml.js plugin. This plugin is essential for our use case as it provides video metadata (video duration) for our backend processing.

Steps to reproduce

  1. Use the version of videojs-record (^4.6.0) and ts-ebml (^2.0.2) on a web application targeting Android devices.
  2. Incorporate the videosjs.record.ts-ebml.js plugin to handle video duration and metadata.
  3. Attempt to record a video using the application on affected devices.

Results

Expected

The application should handle video recording smoothly without any errors or freezing.

Actual

On various Android devices, the application occasionally freezes and throws an "Uncaught (in promise) TypeError" with reference to t.makeMetadataSeekable within videosjs.record.ts-ebml.js. 6863 line -> var originalMetadataSize = originalMetadata[originalMetadata.length - 1].dataEnd - segmentContentStartPos; From that point we cannot provide further information about the bug, since it's in the library in Promise.

Error output

"Uncaught (in promise) TypeError" with reference to t.makeMetadataSeekable within videosjs.record.ts-ebml.js.

Affected Devices:

Samsung Galaxy S10e, Android 12 Samsung Galaxy S10+, Android 12 Xiaomi Mi Note 10 Lite, Android 12 Samsung Galaxy S8, Android 8 Samsung Galaxy S7 edge, Android 8

Additional Information

versions

videojs v7.21.4

videojs-record 4.6.0

ts-ebml 2.0.2

This issue severely impacts the functionality of our application on Android devices, hindering our efforts to support mobile users. Any assistance in diagnosing and resolving this problem would be greatly appreciated.

package Bugsnag Bugsnag-2 Console 3 Console 2 Console