Code Monkey home page Code Monkey logo

video_viewer's People

Contributors

felipemurguia avatar hasanm08 avatar mohamadsobhy avatar mohmmadmoatz avatar rlee1990 avatar seel-channel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

video_viewer's Issues

Support rotation Video

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 ,

failed to build IOS ,method 'GetMedia' isn't defined

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

  • '_VideoViewerCoreState' is from 'package:video_viewer/ui/video_core/video_core.dart' ('../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/video_core/video_core.dart').

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

  • 'RewindAndForwardLayout' is from 'package:video_viewer/ui/video_core/widgets/forward_and_rewind/layout.dart' ('../../src/flutter/.pub-cache/hosted/pub.dartlang.org/video_viewer-1.0.9+1/lib/ui/video_core/widgets/forward_and_rewind/layout.dart').

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

  • 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('../../src/flutter/packages/flutter/lib/src/widgets/framework.dart').

Showing Recent Messages

  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../src/flutter/packages/flutter/lib/src/widgets/framework.dart').

Showing Recent Messages
builder: (value) => _dot(maxWidth, value, 2),

can you help me , i do not know where the proplem .

m3u8 file not working properly 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.

Suggestions or explanation

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.

Web support

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

Dudas y problemas sobre el plugin

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))),
    );
...
  1. 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.

  2. 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.

  3. SubtitleStyle no se aplica cuando está en horizontal, pero sí que funciona en modo vertical/portrait.

  4. ¿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).

IS it the bossiple way to create timestamp on video?

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.

Subs no desaparecen hasta que sale los siguientes

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.

Web platform exception

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 Link Query String (ACL & HMAC) not Preserved after Source Change

Background

HLS Links starts out playing without any issues.

Changing Quality

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.

ERROR

image

something go wrong with dispose in update .

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 .

Change thumbnail on the go

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

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 ,

Unable to play m3u8 links on iOS devices

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 ?

iOS App Crash on Startup

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.

Update Provider dependency

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

¿Es posible reproducir un vídeo desde X segundos hasta Y segundos?

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.

play an pause widget is showing all the time

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 .

seekTo not working

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(() {});
});

}
`

I found some minor issues with your package

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 😉

Turn off brightness control

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.

Cast Feature Request

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.

in next update can you support dio ^4.0.0-beta5

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.

Duration show wrong value

I try video with duration 1h 4m 19s,
it appear 01:64:19 on start ,
but after 4m 19s it go well
I think we should 60 m from minute string,
Screenshot_1608203132
Double-tapping on the right side of the VideoViewer no thing happen .
thanks for Amazing Player .

httpHeader example

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

Null check operator used on a null value (iOS)

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.

can add Arabic Language

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 : "طبيعي",
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.