Commit 34e33a22 authored by 林生雨's avatar 林生雨

commit

parent fe34098b
This diff is collapsed.
......@@ -122,6 +122,9 @@ class AlbumModel {
compute(paseAlbum, event).then((value) {
_mainValue = value;
albumLive.notifyView(_mainValue[_nowDirName]);
});
// }
......@@ -163,11 +166,9 @@ class AlbumModel {
}
void initScanImages(BuildContext context) {
// if (isAndroid) {
_listen = GengmeiFlutterPlugin.phoneImagesEvent
.receiveBroadcastStream()
.listen(_onEvent, onError: _onError);
// }
AlbumRepository.getInstance().scanPhoneImg().listen((value) {
if (value != null) {
_mainValue = value;
......
......@@ -539,9 +539,9 @@ NSString *cacheDirectory;
}else{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :nil];
}
}else if([@"GET_IOS_IMAGE_DATA" isEqualToString:call.method]){
}else if([@"GET_IOS_VIDEO_DATA" isEqualToString:call.method]){
NSString *path=call.arguments;
long resultTemp=self.resultKey;
long resultTempVideo=self.resultKey;
if(path!=nil){
if([[self.scanMap allKeys] containsObject:path]){
PHAsset * assets=self.scanMap[path];
......@@ -551,13 +551,13 @@ NSString *cacheDirectory;
options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic;
[[PHImageManager defaultManager]requestAVAssetForVideo:assets options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
AVURLAsset *urlAsset = (AVURLAsset *)asset;
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :[NSString stringWithFormat:@"%@",urlAsset.URL]];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTempVideo] :[NSString stringWithFormat:@"%@",urlAsset.URL]];
}];
}else{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :nil];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTempVideo] :nil];
}
}else{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :nil];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTempVideo] :nil];
}
}
else{
......
......@@ -81,7 +81,7 @@ class ScanImagePlugn {
}
static Future<String> getIosVideoData(MethodChannel channel, String path) async {
return await channel.invokeMethod("GET_IOS_IMAGE_DATA", path);
return await channel.invokeMethod("GET_IOS_VIDEO_DATA", path);
}
static Future<List> ios_album_path(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment