-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[video_player_web] Error: Unsupported operation: Infinity. #3167
Conversation
(This happens because of a chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=656426) ```Error: Unsupported operation: Infinity at Object.throw_ [as throw] (http://localhost:37461/dart_sdk.js:4328:11) at Number.[dartx.round] (http://localhost:37461/dart_sdk.js:15560:17) at video_player_web._VideoPlayer.new.sendInitialized (http://localhost:37461/packages/video_player_web/video_player_web.dart.lib.js:300:259) at http://localhost:37461/packages/video_player_web/video_player_web.dart.lib.js:254:16 at Object._checkAndCall (http://localhost:37461/dart_sdk.js:4538:16) at Object.dcall (http://localhost:37461/dart_sdk.js:4543:17) at HTMLVideoElement.<anonymous> (http://localhost:37461/dart_sdk.js:105045:21) ```
[video_player_web] Error: Unsupported operation: Infinity.
Reformat the file.
Format file with dartfmt
mhbdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Nothing but a simple if.
Changed the code style.
I'm editing the file on github editor. sorry about that :(
|
👋 Are you maybe trying to do some live-streaming? Looking at the chrome ticket you linked, it was closed as "not a bug" because Maybe this is related to flutter/flutter#30687? If so, I'm not sure if that's a valid fix for this problem. In any case, we'll want so tests to avoid future regressions |
|
@mhbdev |
here is the solution: blobUrlPlayer(source: widget.URL) |
|
Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the checklist reflects the state of the PR as posted please feel free to mark it as ready for review. |
|
Thank you for your contribution. I'm going to close this PR for now since there are outstanding comments, just to get this off our PR review queue. Please don't hesitate to submit a new PR if you have the time to address the review comments. Thanks! |
|
Can you check this out please. This will solve the exception. I forgot to check the boxes when I was done with it. @stuartmorgan |
|
In response to rrousselGit I have to say that you are totally right. This problem appears when there is no known duration for a video like in streams. This fix will avoid exceptions while loading this kind of videos. |
Please see my original comment above; once you've completed the steps there we can review the PR. Feel free to re-open it (or file a new PR if that's easier) once you have done them. |
|
I've posted a PR that should fix this issue: #6101 |
Description
I was trying to make a webcam recorder for flutter web. so I ran into creating html.MediaRecorder and MediaStream to record video and audio both in a file. after recording a simple webm video, something was wrong about the file. Flutter video_player library could not load my video (tested on web platform) and I was getting the error below!
The thing is It's a chrome bug I assume. look it here :)
Related Issues
No related issue!
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?