seel-channel / video_viewer Goto Github PK
View Code? Open in Web Editor NEWFLUTTER PACKAGE: Multiplatform minimalist video viewer with spectacular user experience.
Home Page: https://pub.dev/packages/video_viewer
License: MIT License
FLUTTER PACKAGE: Multiplatform minimalist video viewer with spectacular user experience.
Home Page: https://pub.dev/packages/video_viewer
License: MIT License
When a HLS video is being played on Fullscreen mode, the play button doesn't work. Please can you advise me on what to do regarding this?
some video take by mobile ,
and in full screen it well be so small
can we support in settings rotate option :
normal
90°
-90°
180°
thanks pro ,
Showing Recent Messages
../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/video_core/video_core.dart:219:18: Error: The method 'GetMedia' isn't defined for the class '_VideoViewerCoreState'.
Showing Recent Messages
Showing Recent Messages
Try correcting the name to the name of an existing method, or defining a method named 'GetMedia'.
Showing Recent Messages
final size = GetMedia(context).size;
Showing Recent Messages
../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/video_core/widgets/forward_and_rewind/layout.dart:18:23: Error: The method 'GetMedia' isn't defined for the class 'RewindAndForwardLayout'.
Showing Recent Messages
Showing Recent Messages
Try correcting the name to the name of an existing method, or defining a method named 'GetMedia'.
Showing Recent Messages
SizedBox(width: GetMedia(context).width / 2),
Showing Recent Messages
../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/overlay/widgets/progress_bar.dart:81:42: Error: The argument type 'BuildContext' can't be assigned to the parameter type 'double'.
Showing Recent Messages
../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/overlay/widgets/progress_bar.dart:81:42: Error: The argument type 'BuildContext' can't be assigned to the parameter type 'double'.
Showing Recent Messages
builder: (value) => _dot(maxWidth, value, 2),
Showing Recent Messages
../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/overlay/widgets/progress_bar.dart:81:16: Error: The argument type 'Widget Function(BuildContext)' can't be assigned to the parameter type 'Widget Function(BuildContext, double, Widget)'.
Showing Recent Messages
Showing Recent Messages
Showing Recent Messages
builder: (value) => _dot(maxWidth, value, 2),
can you help me , i do not know where the proplem .
I'm able to play videos with different resolutions in Android but the video is not playing in iOS.
Thanks for this package. It's awesome.
But
The m3u8 formate not working in IOS properly it takes more time then in android. Let say in android my url takes 3-4 seconds to load but in IOS it takes more then 10 seconds.
Could you fix this issue. I need it.
provide a Listener to player state
isPlaying
IsPause
IsBuffering
does this library support RTSP stream protocol?
I have in my class the size of the video i would love to add it in the quality picking UI
and how can I force landscape mode in full screen
thanks in advance.
Lang does not change in full screen ,
remove package:path_provider/path_provider.dart
in lib\domain\entities\video_source.dart
and use VideoPlayerController.network
instead of VideoPlayerController.file
you can use https://pub.dev/packages/video_player_web_hls
for hls files
Primero de todo, gracias por el plugin, lo acabas de publicar y tiene casi todo lo que necesitaba para mi app: thumbnail, subtítulos, varias calidades... Incluso, tras investigar el código, he encontrado que puedo personalizar los subtítulos.
Antes de incluirlo en mi app, he estado probando con el ejemplo, en mi código tengo:
...
VideoViewer(
source: {
"SD": VideoSource(
video: VideoPlayerController.network("<url vídeo_sd>"),
subtitle: {
"English": VideoViewerSubtitle.network(
"<url eng.srt>",
type: SubtitleType.srt,
),
"Español": VideoViewerSubtitle.network(
"<url spa.srt>",
type: SubtitleType.srt,
),
},
),
"HD": VideoSource(
video: VideoPlayerController.network("<url vídeo_hd>"),
subtitle: {
"English": VideoViewerSubtitle.network(
"<url eng.srt>",
type: SubtitleType.srt,
),
"Español": VideoViewerSubtitle.network(
"<url spa.srt>",
type: SubtitleType.srt,
),
},
),
},
style: VideoViewerStyle(
thumbnail: Image.network("<url .jpg>"),
subtitleStyle: SubtitleStyle(
style: TextStyle(
fontSize: 14,
color: Colors.white,
),
alignment: Alignment(-1.0, 1.0),
padding: const EdgeInsets.only(left: 50, right: 40, bottom: 40))),
);
...
Como ya han dicho en otro issue ("full screen have a some issues like its does not go back normal i mean in potrait mode from landscape mode.") cuando salgo de la pantalla completa, a veces se queda el fondo negro como si no saliera de la pantalla completa.
Cuando he dejado que cargue bien la calidad SD y cambio a HD, primero tarda un poco en cambiar, y cuando cambia, se ve el vídeo HD pero se sigue escuchando la calidad SD sin posibilidad de pausarlo ni nada, y se siguen viendo los subtítulos del SD hasta que salen los nuevos de la versión HD.
SubtitleStyle
no se aplica cuando está en horizontal, pero sí que funciona en modo vertical/portrait.
¿Cómo puedo hacer que por defecto no cargue ningún subtítulo? Ahora mismo carga directamente los subtítulos en inglés (creo que porque son los primeros de la lista).
add option export screenshot from video ,
with bool value to allowed it or not allowed it .
Hello. I don't know if it is the right place to ask such question, but I would like to know if your plugin could help me to solve my issue (I think, it is pretty specific task). I have the live streaming videos from my API, so I would like to stream it in my widget and have ability to put a timestamp on the timeline in format from... to...
Also the difficulties is about that video doesn't have the end and the beginning. It is just infinite until i close streaming.
Is it possible with your package?
Thanks you.
Buenas, he detectado otro problema y es que, cuando los subs están activados, sale el texto que corresponde, pero no desaparecen, se mantienen hasta que sale la siguiente línea de texto en vez de borrarse cuando debería.
Uso un fichero .srt, no sé si solo pasa con este tipo de subs o si con el código de ejemplo del repo también pasa. Cuando pueda lo pruebo.
Is there hls support on the web?
Play video from Uint8List
Error: PlatformException(MEDIA_ERR_SRC_NOT_SUPPORTED, No further diagnostic information can be determined or provided.,
The video has been found to be unsuitable (missing or in a format not supported by your browser)., null)
at Object.createErrorWithStack (http://localhost:12595/dart_sdk.js:5050:12)
at Object._rethrow (http://localhost:12595/dart_sdk.js:37641:16)
at async._AsyncCallbackEntry.new.callback (http://localhost:12595/dart_sdk.js:37637:13)
at Object._microtaskLoop (http://localhost:12595/dart_sdk.js:37497:13)
at _startMicrotaskLoop (http://localhost:12595/dart_sdk.js:37503:13)
at http://localhost:12595/dart_sdk.js:33274:9
HLS Links starts out playing without any issues.
When the quality is switched the below stack trace is generated. Looks like a 403 Error. Might be because the request is not made properly when sent.
I've tried the same link with a random Web Player. Other less featured HLS players for Flutter (Which I don't like). Seems like they are able to switch the renditions without any problems.
My theory is, it is only happening where the (HLS) Stream is private. Open & Free HLS (m3u8) links don't really have the ACLs and HMACs.
if the user enter video and does not wait to begin ,and pop up .
_controller.dispose(); , _controller.controller.dispose(); do not work
and the video will start in the background , and does not close until the user close the app .
I have used this plugin in many apps, But my current requirement is to change the thumbnail with the controller, I have tried many ways but till then no luck.
Please add this or show me how can i achieve this.
Thank you
Support Widget header ,
forward does not appear and does not work ,
can support hls format quality ,
can support one controller for two dataSource one for video and one for audio ,
or Muti for audio ,
thanks for your player ,
Thank you for the awesome product.
I have noticed some of the links are not working on iOS devices as well as iOS simulators. based on your example m3u8 link
https://sfux-ext.sfux.info/hls/chapter/105/1588724110/1588724110.m3u8 it works well on both devices.
I have tried some m3u8 links which are not working on iOS real devices and simulators but works on android devices, please find the below example links.
https://5421175365ea3.streamlock.net/live/smil:switch.smil/playlist.m3u8
https://dcunilive28-lh.akamaihd.net/i/dclive_1@533583/master.m3u8
Is there anyway we can fix them ?
Hi,
As you can see in the attached video, The app remains in Landscape mode after clicking on the "full screen" button to get back and see the video in the normal view. The app should back to Portrait mode again. This issue is happening only in iOS.
Any solution for this?
I'm using the latest version of video_viewer package , the iOS app crashes when i try to run it on a simulator or a real iPhone device. @FelipeMurguia Kindly, look into it.
if can set Directionality or some thing to fix that ,
thanks bro .
Hello !
I would like to try your package but i am not able to because i require the provider: ^6.0.0
package and yours is provider: ^5.0.0
Could you please upgrade your dependencies ?
Thanks in advance
Buenas de nuevo, aún sigo usando tu plugin, pero ahora tengo un nuevo problema.
Desde la app de Flutter obtengo el vídeo desde un PHP y funciona bien, pero ahora quiero que el vídeo se reproduzca, por ejemplo desde 0:00 - 2:00 y en otra vista desde 2:00 - 4:00, etc...
Mi pregunta es si se podría elegir desde Dart desde dónde hasta dónde quiero que se reproduzca el vídeo completo, así no tendría que editarlo manualmente y subir todos esos cortes al servidor, y me serviría el mismo código por si esa duración cambia de nuevo en el futuro.
Un saludo.
how can auto hidden this widget with over flow ,
i want use the player to live stream with chat ,
is possible to provide overflow widget in fullscreen , to used to appear massages .
can you please add pip to the player actions?
maybe pip_view: ^0.9.6-nullsafety or easy_pip: ^0.1.0 can be useful
Hi, I have the following code (adapted a little, just to show the problem). The seekTo function sis not working. It always starts from beginning of video... I tried putting the seekTo call before initialising videoViewer and after. Any ideas of what might be happening? Thank you!
`VideoViewerController videoController = VideoViewerController();
Widget? videoViewer;
@OverRide
void initState() {
super.initState();
// initialize video
videoViewer =
VideoViewer(
controller: videoController,
autoPlay: true,
source: {
"video":
VideoSource(video: VideoPlayerController.file(File(filePath))),
});
videoController.seekTo(Duration(milliseconds: filePosition));
setState(() {});
});
}
`
1-When we press full screen button it gives a exception error the getter size was called null.
2-thumbnail does not show . I don't know why its show only white colour.
3-full screen have a some issues like its does not go back normal i mean in potrait mode from landscape mode.
4-http url doesn't work properly.
Please resolve as soon as possible i love this package 😉
Is there a way to turn off brightness control from gesture detector on the video? I don't want my users changing there brightness settings when trying to scroll down on touching the video.
This package is very good and have many user friendly features. But can you guys please add casting feature to this app. Like google chromcast and Air play.
Any plans to implement reverse playback capability?
Because no versions of video_viewer match >1.1.0 <2.0.0 and video_viewer 1.1.0 depends on dio ^3.0.10, video_viewer ^1.1.0 requires dio ^3.0.10.
And because no versions of dio match >3.0.10 <4.0.0, video_viewer ^1.1.0 requires dio 3.0.10.
And because dio 3.0.10 depends on http_parser >=0.0.1 <4.0.0 and http >=0.13.0 depends on http_parser ^4.0.0, video_viewer ^1.1.0 is incompatible with http >=0.13.0.
And because firebase_storage >=8.0.0 depends on firebase_storage_web ^1.0.0 which depends on http ^0.13.0, video_viewer ^1.1.0 is incompatible with firebase_storage >=8.0.0.
So, because eteaching depends on both video_viewer ^1.1.0 and firebase_storage ^8.0.0, version solving failed.
Thank you for your work!
Android
version:1.1.0
flutter:2.0.2
In the full screen mode, if you change the video link, the video screen is not updated, but the sound and so on are updated.
Hello,
I'm not sure if it the right place for my request.
First thank you for your awesome widget.
Based on your demo example I'm trying to change The Witcher url video for another url, but with header.
so I did this change on your //VIDEO VIEWER WIDGETS//
widget.movie.title: VideoSource(
video: VideoPlayerController.network(
"https://xxxxxxxx.xx/xxxxxx.mp4",
httpHeaders: {"Cookie": "token=xxxxxxxxxxxxx"},
),
that work.
Now I'm trying to change the serie viewer part.
Best regards
Hello, could you possibly add support for http header?
Is there a function to add caching rules in the future.
For example, play cache
Hey, I love this package, I would really love it if you might be able to migrate to null safety.
First of all, thank you for all your hard work.
As I see, this package also utilizes helpers
library, which you also developed. When changing the orientation of the device during playback I randomly get the next error (more often after changing from landscape back to portrait):
Null check operator used on a null value
When the exception was thrown, this was the stack:
#0 GlobalKeyHelperExtension.size (package:helpers/helpers/extensions/global_key.dart:33:40)
#1 _SwipeTransitionState._changeData.<anonymous closure> (package:helpers/helpers/transition.dart:206:40)
#2 Misc.onLayoutRendered.<anonymous closure> (package:helpers/helpers/misc.dart:11:66)
#3 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#4 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1090:9)
As I see helpers
uses a lot of !
operators. For example,
static void onLayoutRendered(void Function() callback) {
WidgetsBinding.instance!.addPostFrameCallback((d) => callback());
}
or
Size? get size => this.currentContext!.size;
Using an exclamation mark operator is discouraged, since it's not safe, especially when accessing flutter BuildContext.
Anyway, I wanted to fix this issue somehow, but unfortunately, the stack trace leads me nowhere. Maybe you will be able to help identify which code is executed during orientation change?
My code is as simple as:
@override
Widget build(BuildContext context) {
return Center(
child: VideoViewer(
source: {
'1080p': VideoSource(
video: VideoPlayerController.network(url),
subtitle: captions
.asMap()
.map((key, value) => MapEntry(value.label, VideoViewerSubtitle.network(value.url))))
},
controller: controller,
language: VideoViewerLanguage.en,
autoPlay: true,
),
);
}
I was trying to utilize onFullscreenFixLandscape
property (btw, when exit the fullscreen it looks like it does not set the orientation back to portrait) and also just manual changing of the device orientation. All is resulting in the overseen issue.
Thank you in advance.
When i use android tv emulator it works perfectly but when building the app and installing the apk on an android tv it does not take up the entire tv space.
can a slider for the screen brightness be added ?
if you time allowed add ar lang in next update ,
it will like thise
///ARABIC LANGUAGE
static const VideoViewerLanguage ar = VideoViewerLanguage(
settings: "إعدادات",
quality: "الجودة",
speed: "السرعة",
normal : "طبيعي",
);
When I exit the fullscreen in iOS, it looks like it does not set the orientation back to portrait and the orientiation stays in landscape forever
how to play videos located on the device
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.