Git Product home page Git Product logo

Comments (9)

jerrypaulsam avatar jerrypaulsam commented on June 2, 2024 2

Hey, I am having the same issue. Have you got a solution?

Thanks

from story_view.

waqadArshad avatar waqadArshad commented on June 2, 2024 1

@blackmann Can you please take a look at this? this is causing issues for me.

from story_view.

jerrypaulsam avatar jerrypaulsam commented on June 2, 2024

I was able to resolve this problem by loading the video directly from the url instead of the cached file. The error might be related to the caching in the VideoLoader class [Also, there is an open issue with Flutter itself]. So, for iOS, I am loading the video directly from url and for android from the cached file.

from story_view.

MartinBergerDX avatar MartinBergerDX commented on June 2, 2024

@jerrypaulsam What does that mean, loading the video directly from the url, instead of cached file? How do you load the video "directly"?

In my case, I just pass the media url to StoryItem.pageVideo constructor, but still fails on iOS:

  /// Shorthand for creating page video. [controller] should be same instance as
  /// one passed to the `StoryView`
  factory StoryItem.pageVideo(
    String url, {
    required StoryController controller,
    Key? key,
    Duration? duration,
    BoxFit imageFit = BoxFit.fitWidth,
    String? caption,
    bool shown = false,
    Map<String, dynamic>? requestHeaders,
  }) {
    return StoryItem(
        Container(
          key: key,

How do you load a video from a cache? You do not have access to VideoLoader here.

from story_view.

jerrypaulsam avatar jerrypaulsam commented on June 2, 2024

@MartinBergerDX Hey Martin, We forked the repo and made slight changes to the code.

from story_view.

MartinBergerDX avatar MartinBergerDX commented on June 2, 2024

@jerrypaulsam Thanks for the answer! There are about 50 forks for story_view and I could not find your fork. But does not matter, I fixed it.

I have fixed it by adding ContentType to my files when uploading them with Amplify.Storage category in Flutter.

Future<StorageObject> uploadFile(
      File file,
      String s3Folder,
      List<String>? subfolderPathComponents,
      Map<String, String>? metadata,
      String? contentType,
      Function(double progress)? progressUpdate) async {
    final storageKey = _generateStorageKey(file, subfolderPathComponents);
    final uploadOptions = S3UploadFileOptions(
      accessLevel: StorageAccessLevel.protected,
      metadata: metadata,
      contentType: contentType,
    );
    debugPrint(
        'Beginning file upload with key: $storageKey, s3Folder: ${s3Folder}, subfolderPathComponents: ${subfolderPathComponents.toString()}, metadata: ${metadata.toString()}, contentType: ${contentType}.');
    final UploadFileResult result = await Amplify.Storage.uploadFile(
        local: file,
        key: storageKey,
        options: uploadOptions,
        onProgress: (progressUpdate != null)
            ? (progress) {
                progressUpdate(progress.getFractionCompleted());
              }
            : null);
    debugPrint('Successfully uploaded file with key: ${result.key}');
    final serverUploadStorageKey = _convertToAmplifyStorageKey(s3Folder, storageKey);
    debugPrint('Server upload storage key: $serverUploadStorageKey');
    return StorageObject(
      s3Folder: s3Folder,
      subfolderPathComponents: subfolderPathComponents,
      storageKey: storageKey,
      serverUploadStorageKey: serverUploadStorageKey,
    );
  }

By using S3UploadFileOptions.

final uploadOptions = S3UploadFileOptions(
      accessLevel: StorageAccessLevel.protected,
      metadata: metadata,
      contentType: contentType,
    );

ContentType is set to video/mp4 and when specified here is reflected on S3 in AWS Console. [year 2023]

AWS is making an update for this.

It seems that story_view requires some maintainers, it is awfully forgotten :)

Take care.

from story_view.

AliSamir070 avatar AliSamir070 commented on June 2, 2024

any solution please i'm stuck in this problem ?

from story_view.

Kanwarpalsingh1986 avatar Kanwarpalsingh1986 commented on June 2, 2024

really very bad support, no update on this issue, many users facing this issue form more than 1 year, they have the new versions but no fix on this issue, also no reply

from story_view.

Obada2020 avatar Obada2020 commented on June 2, 2024

any updates ?

from story_view.

Related Issues (20)

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.