Flutter无法播放某些视频的视频

时间:2019-11-16 03:58:26

标签: flutter flutter-dependencies video-player

当我使用示例视频链接进行测试时,它可以工作。 但是当我尝试使用自己的网址时,会显示此错误:

2019-11-16 10:54:42.991657+0700 Runner[3249:923367] flutter: ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
2019-11-16 10:54:42.992286+0700 Runner[3249:923367] flutter: The following NoSuchMethodError was thrown while dispatching notifications for
2019-11-16 10:54:42.992672+0700 Runner[3249:923367] flutter: VideoPlayerController:
2019-11-16 10:54:42.992994+0700 Runner[3249:923367] flutter: The method 'call' was called on null.
2019-11-16 10:54:42.993239+0700 Runner[3249:923367] flutter: Receiver: null
2019-11-16 10:54:42.993438+0700 Runner[3249:923367] flutter: Tried calling: call()
2019-11-16 10:54:42.993740+0700 Runner[3249:923367] flutter:
2019-11-16 10:54:42.993907+0700 Runner[3249:923367] flutter: When the exception was thrown, this was the stack:
2019-11-16 10:54:42.994106+0700 Runner[3249:923367] flutter: #0      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:206:21)
2019-11-16 10:54:42.994309+0700 Runner[3249:923367] flutter: #1      ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:273:5)
2019-11-16 10:54:42.994505+0700 Runner[3249:923367] flutter: #2      VideoPlayerController.initialize.errorListener (package:video_player/video_player.dart:275:7)
2019-11-16 10:54:42.994646+0700 Runner[3249:923367] flutter: (elided 18 frames from package dart:async)
2019-11-16 10:54:42.994827+0700 Runner[3249:923367] flutter: ...
2019-11-16 10:54:42.994991+0700 Runner[3249:923367] flutter:
2019-11-16 10:54:42.995186+0700 Runner[3249:923367] flutter: The VideoPlayerController sending notification was:
2019-11-16 10:54:42.995351+0700 Runner[3249:923367] flutter:   VideoPlayerController#e71bc(VideoPlayerValue(duration: null, size: null, position: 0:00:00.000000,
2019-11-16 10:54:42.995523+0700 Runner[3249:923367] flutter:   buffered: [], isPlaying: false, isLooping: false, isBuffering: falsevolume: 1.0, errorDescription:
2019-11-16 10:54:42.995694+0700 Runner[3249:923367] flutter:   Failed to load video: Operation Stopped))

请帮助, 谢谢。

0 个答案:

没有答案