Comments (9)
Hey, I am having the same issue. Have you got a solution?
Thanks
from story_view.
@blackmann Can you please take a look at this? this is causing issues for me.
from story_view.
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.
@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.
@MartinBergerDX Hey Martin, We forked the repo and made slight changes to the code.
from story_view.
@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.
any solution please i'm stuck in this problem ?
from story_view.
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.
any updates ?
from story_view.
Related Issues (20)
- Captions - Background
- request
- ios: Unhandled Exception: PlatformException(VideoError, Failed to load video... HOT 4
- How to add a path to a local image to the Story item url property HOT 1
- Run next story one by one HOT 1
- How to show story views
- Story View pauses when loading Second Story
- Had to double tap the slide to go to previous slide
- How to hide ProgressPosition bar?
- how to set buttom padding of ProgressPosition
- First item is getting played thrice HOT 1
- please need to audio support HOT 1
- Progress bar to match the video legnth? HOT 1
- I want write test cases for this story view widgets HOT 1
- We need to return current index in onStoryShow method HOT 2
- StoryView not playing video stories HOT 3
- Read/unread story index not found HOT 3
- Enhanced Indicator with Content Loading, Video Duration, and Customizable Widget HOT 1
- I would like to select a clickable link for the subtitle feature but this feature is not available, do you have any suggestions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from story_view.