问题标签 [flutter-video-player]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
139 浏览

flutter - 如何在颤动中添加多个链接到firebase的视频播放器

我正在尝试制作 youtube、twitch 和 instagram 视频的页面。url 存储在称为视频的 firebase 集合中作为文档。每个文档都有视频名称、网址、类型和简短描述。我可以轻松检索所有这些网址,但现在我想将它们转换为视频。有谁知道该怎么做?我尝试使用 video_player 插件,但它需要我使用控制器,并且由于有 x 个视频,制作很多控制器似乎不是正确的方法。我知道这可能很容易,但我无法解决它. 任何帮助或建议将不胜感激。

0 投票
2 回答
1257 浏览

flutter - 颤动中的 Twitch 视频

我想创建一个颤振网站,其中包含 twitch 和 youtube 视频的集合。我尝试使用 video_player 插件,但为此我可以使用 youtube_player 插件,或者我必须使用 API 将所有链接转换为其源文件。但我无法制作嵌入抽搐视频的内容。任何事物。与 youtube 相同的页面会很完美,但是单独的 twitch 播放器也会很好。也许 Twitch API 可以提供帮助,但我不知道如何使用它,也无法理解它。以下是我发现的可能会用到的插件\

1> Video_Player
2> Youtube_Player_plugin
请帮忙

编辑
这是我用来用 ext_video_player 制作 youtube 视频的代码,因为它可以在网络上运行。

编辑
我想出了一种使用 iFrame 制作视频的新方法。使用它我可以添加抽搐流,但我只想要视频,而不是聊天和其他东西的全部内容。怎么做?这是我现在使用的coe

0 投票
0 回答
381 浏览

android - 在发布版本中以慢动作播放的 Flutter 视频播放器

我一直在使用 video_player: ^0.10.11+2 在我的应用程序中播放和显示视频,当我在我的设备上使用颤振运行进行测试时,每个运行都很顺利。但是当我在 Android 和 iOS 上发布版本时,视频以慢动作播放并且没有声音。有时它以慢动作播放,也像被划伤一样播放。

这是一个已知问题还是正在做一些完全错误的事情。

0 投票
2 回答
283 浏览

flutter - 如何在颤动的videoplayercontroller.asset()中打印视频路径

所以我试图做一个功能,当我们点击一​​个图标按钮时,它会改变视频路径。它将使用字符串更改视频路径。我正在使用 print("$videoname") 来确保字符串发生变化,并且确实如此。但它仍然不起作用,使用 videoplayercontroller.assets(): 在此处输入图像描述 这是我试图制作的代码

0 投票
1 回答
296 浏览

flutter - 如何在颤动的 VideoPlayer 上捕获服务器端错误?

尝试使用 Vimeo url、video_player 和chewie 播放器获取视频时,出现错误

如何打印网站上图片中显示的图像而不是这里的错误?

在此处输入图像描述

我如何在颤振应用程序上捕获此错误

0 投票
1 回答
2421 浏览

flutter - 我如何在颤振中播放网络视频

我正在尝试将来自不同站点的网络视频放在 Flutter 中。

我使用了video_player包。我使用了一个未来的构建器,CircularProgressIndicator它将继续运行直到加载视频。当我运行该应用程序时,在开始时CircularProgressIndicator继续运行,几秒钟后它会停止,好像视频已加载但它在模拟器上显示完全空白。换句话说,视频没有加载。

在我启动应用程序后

在此处输入图像描述

加载后

在此处输入图像描述

这是代码

0 投票
1 回答
1380 浏览

android - Flutter video_player unable to play a few videos from file

I'm building a Flutter app that takes a list of video clip URL's from Firebase, downloads them to storage and stores the file paths. Afterwards the user can go through the list of video paths and play the video clips that has been downloaded. This is done with the Flutter video_player.

ISSUE

It should be pretty straight forward, but for some reason, some of the video clips can't be loaded and played by the VideoPlayerController. All the video clips are in the exact same format, having been rendered, compressed and uploaded the same way.

Each video clip is downloaded to storage like this:

The videoPathwill then be stored in a list and sent the screen containing the video player.

Inside the video player screen, that is how it will load the video clips from file:

This code will use index to change between each file in the list.

When I run this, about 50% of the clips will load and play perfectly, while the others will return the following error on log:

I seem to have isolated the problem to the way I save the videoclips to storage (See NOTES), but that doesn't explain why some clips work and others don't.

Does anybody know what might be going on, and how to fix it? Or have anybody had the same issue, and might have some experience to share?

Thanks in advance!

NOTES

  • Whenever I skip the download-to-storage-process, and just use VideoPlayerController.network(videos[index].videoUrl) all the videos will play without any issues. It's important however, that all the videoclips are downloaded at the same time in the beginning.

  • It's the same clips each time that either works or not, and it doesn't matter what position they come in.

  • I've check up on all the paths getting sent to the VideoPlayerController, and they're all correctly stored and shared with the video player.

  • Might be related to this post: Flutter video_player not playing video saved to application directory

0 投票
0 回答
162 浏览

android - 如何禁用整个应用程序的音频功能

我有一个使用 video_player 包播放视频的应用程序。这些视频有声音,但我不想播放。为此,我使用:

问题是每当我打开应用程序时,甚至在播放视频之前,任何背景音乐都会停止。

我想一定有办法说“这个应用程序没有声音功能”,然后操作系统不会暂停任何背景音乐。

有没有一种特定的方法可以做到这一点,或者我应该寻找 iOS 和 Android 特定的解决方案?

谢谢!

0 投票
1 回答
1533 浏览

flutter - Flutter Chewie 行为问题

大家好,我需要你的帮助。我有个问题。我只想在横向模式下实现全屏播放器。

并将视频播放器页面留在后退按钮或离开全屏。没有 fullScreenByDefault: true 一切似乎都很好。我可以按后退按钮并返回上一个屏幕。

但是,如果它设置为 true,就会出现问题。按下后退按钮或最小化按钮会进入纵向模式 1 秒钟,然后返回横向,接下来是纵向模式。Next 终于关闭了这个页面。我希望在第一个后退按钮后关闭页面或离开全屏。而且我不知道出了什么问题。提前感谢您的帮助。

0 投票
3 回答
2850 浏览

flutter - video_player 插件无法播放视频 - Flutter

我将颤振更新到 1.22.0,现在我的 video_player 给了我异常错误。在我将颤振更新到 1.22.0 之前它工作正常。

这是我的错误:

E/flutter(8545):[错误:flutter/lib/ui/ui_dart_state.cc(177)]未处理的异常:'package:flutter/src/services/message_codec.dart':断言失败:第111行pos 15:'code != null': 不正确。E/flutter (8545): #0
_AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39) E/flutter (8545): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart: 36:5) E/flutter (8545): #2
new PlatformException (package:flutter/src/services/message_codec.dart:111:15) E/flutter (8545): #3 VideoPlayerApi.create (package:video_player_platform_interface/messages .dart:205:13) E/flutter (8545): E/flutter (8545): #4
MethodChannelVideoPlayer.create (package:video_player_platform_interface/method_channel_video_player.dart:46:42) E/flutter (8545): #5 VideoPlayerController.initialize (package:video_player/video_player.dart:275:45) E/flutter (8545): #6 _ScreenBackgroundVideoState.initState (package:flow/widget/background/screen_background_video.dart:17:9) E/flutter (8545): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4765:58) E /flutter (8545): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter (8545): #9 Element.inflateWidget (package:flutter/src/widgets/framework .dart:3569:14) E/flutter (8545): #10 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6236:32) E/flutter (8545): #11 Element.inflateWidget (package :flutter/src/widgets/framework.dart:3569:14) E/flutter (8545): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #13 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter (8545): #14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14 ) E/flutter (8545): #15 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #16 ComponentElement.performRebuild (package:flutter/src/widgets /framework.dart:4652:16) E/flutter (8545): #17 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5) E/flutter (8545): #18 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5) E/flutter (8545): #19 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter (8545): #20 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter (8545): #21 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #22 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14 ) E/flutter (8545): #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter (8545): #24 Element.updateChild (package:flutter/src/widgets /framework.dart:3327:18) E/flutter (8545): #25 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter (8545): #26 Element.inflateWidget (包:flutter/src/widgets/framework.dart:3569:14)E/flutter(8545):#27 Element.updateChild(包:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #28 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter (8545): #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter (8545): #30 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18 ) E/flutter (8545): #31 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter (8545): #32 Element.inflateWidget (package:flutter/src/widgets /framework.dart:3569:14) E/flutter (8545): #33 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #34 ComponentElement.performRebuild (包:flutter/src/widgets/framework.dart:4652:16)E/flutter(8545):#35 Element.rebuild(包:flutter/src/widgets/framework.dart:4343:5) E/flutter (8545): #36 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5) E/flutter (8545): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter (8545): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14 ) E/flutter (8545): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter (8545): #40 SingleChildRenderObjectElement.mount (package:flutter/src/widgets /framework.dart:6118:14) E/flutter (8545): #41 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter (8545): #42 Element.updateChild (包:flutter/src/widgets/framework.dart:3327:18)E/flutter(8545):#43 ComponentElement.performRebuild(包:颤振/src/widgets/framework.dart:4652:16)

这是我的代码:

需要帮助来解决这个问题。