Closed SittiphanSittisak closed 10 months ago
sadly its not supported by video_player interface, but media_kit can play local videos on web. so i recommend using media_kit for that case
I think byte or Uint8List are the basic types of all files and every platform supports this type. Can you add a solution to Uint8List instead of using the URL, File?
I found a solution to display this video from Uint8List by this but it does not work successfully for all browsers.
final url = html.Url.createObjectUrlFromBlob(blob); //Uint8List can convert/revert to blob
controller.setDataSource(
DataSource(type: DataSourceType.network, source: url),
autoplay: true,
);
I think byte or Uint8List are the basic types of all files and every platform supports this type. Can you add a solution to Uint8List instead of using the URL, File?
I found a solution to display this video from Uint8List by this but it does not work successfully for all browsers.
final url = html.Url.createObjectUrlFromBlob(blob); //Uint8List can convert/revert to blob controller.setDataSource( DataSource(type: DataSourceType.network, source: url), autoplay: true, );
You mean to integrate it in the package?
Isn't this fix enough?
I think if it is not supported as you said, that is enough.
sadly its not supported by video_player interface, but media_kit can play local videos on web. so i recommend using media_kit for that case
I can custom if/else statements for using this method for the web and using the convert to file solution on Android/iOS.
I think if it is not supported as you said, that is enough.
sadly its not supported by video_player interface, but media_kit can play local videos on web. so i recommend using media_kit for that case
I can custom if/else statements for using this method for the web and using the convert to file solution on Android/iOS.
Yeah custom imports for web since you are using html, sorry that I couldn't help also thanks for letting me know that it can be done ❤️
I always thought it was impossible
This package supports the web platform but I can't convert the byte to a File with the io package that does not support the web platform. The
DataSource
supports File from the io package and the source with string type.