Closed imoegirl closed 3 years ago
Will take a look, thx.
Hi, I would like to ask, when can this problem be fixed? My product needs to use this function.
Hey, will look into it this week :) On Tue, 9 Feb 2021 at 08:07, 萌一小栈 notifications@github.com wrote:
Hi, I would like to ask, when can this problem be fixed? My product needs to use this function.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/StansAssets/com.stansassets.ios-native/issues/60#issuecomment-775693621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3ZMCIEGK4EG2MNETAJQPDS6DGLLANCNFSM4XIJHHPQ .
--
Kind Regards, Stanislav Osipov.
Hi, Any progress?
Just checked the latest version and works just fine for me. Do you have any logs?
Fixed!
I upgraded your asset to the latest version but I am still seeing the Question Mark image as attached by imoegirl when I use:
Texture2D thumbnail = ISN_AVAssetImageGenerator.CopyCgImageAtTime(result.MediaURL, 0);
How to fix this?
Hi @tahafarooq7, what version of package do you have? This could occur if you give wrong url to the file or for example you don't have access to this video file. How did you get result.MediaURL? Also we have example scene in our plugin ISN_UIImagePickerControllerExample that also use this method for generating thumbnail for video that you pick from gallery or camera, can you please check does it work for you?
Hi @foritari I am using the iOS Native Pro (Version 2021.1.0) and Ultimate Mobile Pro (Version 2021.1.0). The url is correct because I am playing the video too and it plays correctly. I am following this example for getting the URL of a video selected from the gallery: https://github.com/StansAssets/com.stansassets.ios-native/wiki/Pick-or-Capture-a-Video#pick-a-video-from-photo-library
I'll check that example you mentioned and see if that works and let you know.
No, unfortunately, even in the example scene, it is showing me the same Question mark image when I use Select video from PhotoLibrary or Album.
Any suggestions?
@tahafarooq7 Send me logs from XCode when you using ISN_UIImagePickerControllerExample this scene please. Or can you please send me your xcode project with just this ISN_UIImagePickerControllerExample scene. Because for me this work just fine.
@foritari Sorry for the delayed response. The error is "NSURLConnection finished with error - code - 1002"
Complete logs from Xcode are as follows: 2021-07-06 20:48:06.555008+0500 StansAssetsDemo[56266:13146085] Built from '2019.4/release' branch, Version '2019.4.20f1 (6dd1c08eedfa)', Build type 'Development', Scripting Backend 'il2cpp'
2021-07-06 20:48:06.556320+0500 StansAssetsDemo[56266:13146085] MemoryManager: Using 'Default' Allocator.
-> applicationDidFinishLaunching()
PlayerConnection initialized from /private/var/containers/Bundle/Application/6110DD8D-4B23-4514-831E-C70E09860A86/StansAssetsDemo.app/Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55000
Multi-casting "[IP] 192.168.0.128 [Port] 55000 [Flags] 2 [Guid] 1594479003 [EditorId] 848023126 [Version] 1048832 [Id] iPhonePlayer(Taha-Farooqs-iPhone):56000 [Debug] 0 [PackageName] iPhonePlayer [ProjectName] StansAssetsDemo" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55000]
PlayerConnection already initialized - listening to [0.0.0.0:55000]
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A13 GPU
Initialize engine version: 2019.4.20f1 (6dd1c08eedfa)
2021-07-06 20:48:06.845166+0500 StansAssetsDemo[56266:13146292] fopen failed for data file: errno = 2 (No such file or directory)
2021-07-06 20:48:06.845236+0500 StansAssetsDemo[56266:13146292] Errors found! Invalidating cache...
2021-07-06 20:48:07.497242+0500 StansAssetsDemo[56266:13146292] fopen failed for data file: errno = 2 (No such file or directory)
2021-07-06 20:48:07.497305+0500 StansAssetsDemo[56266:13146292] Errors found! Invalidating cache...
-> applicationWillResignActive()
2021-07-06 20:48:07.791830+0500 StansAssetsDemo[56266:13146085] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x103945af0>.
-> applicationDidBecomeActive()
UnloadTime: 0.976458 ms
2021-07-06 20:48:09.783238+0500 StansAssetsDemo[56266:13146085] IOSNative::LogLevel -> info:true warning:true error:true
Unloading 5 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.275542 ms
System memory in use before: 28.5 MB.
System memory in use after: 28.7 MB.
Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 1472.
Total: 0.725833 ms (FindLiveObjects: 0.095208 ms CreateObjectMapping: 0.066750 ms MarkObjects: 0.545208 ms DeleteObjects: 0.017917 ms)
Setting up 1 worker threads for Enlighten.
Thread -> id: 16f35b000 -> priority: 1
2021-07-06 20:48:13.461665+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_UI_PresentPickerController data: {"m_MediaTypes":["public.movie"],"m_SourceType":0,"m_AllowsEditing":false,"m_ImageCompressionRate":0.800000011920929,"m_MaxImageSize":512,"m_EncodingType":1,"m_CameraDevice":0,"m_ModalPresentationStyle":-2}
2021-07-06 20:48:19.519668+0500 StansAssetsDemo[56266:13146085] IOSNative::Native->Unity method: didFinishPickingMedia data: {"m_MediaType":"public.movie","m_error":{"m_message":"","m_code":0},"m_MediaUrl":"file:\/\/\/private\/var\/mobile\/Containers\/Data\/Application\/7D58335B-0101-4E64-BAA3-61E8E63B7E6A\/tmp\/trim.028FCFED-4277-4178-98D2-B4B05CA2582D.MOV"}
2021-07-06 20:48:19.524675+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_UI_PresentUIAlertController data: {"m_Id":1,"m_Title":"UIImagePickerController","m_Message":"Video Loaded!","m_PreferredStyle":1,"m_Actions":[{"m_Id":2,"m_Title":"Ok","m_Style":0,"m_Enabled":true,"m_Preferred":false,"m_Image":""}]}
2021-07-06 20:48:21.709932+0500 StansAssetsDemo[56266:13146085] IOSNative::Native->Unity method: OnUIAlertAction data: {"m_AlertId":1,"m_ActionId":2}
2021-07-06 20:48:21.716183+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_CopyCGImageAtTime data: /var/mobile/Containers/Data/Application/7D58335B-0101-4E64-BAA3-61E8E63B7E6A/tmp/trim.028FCFED-4277-4178-98D2-B4B05CA2582D.MOV
2021-07-06 20:48:21.834564+0500 StansAssetsDemo[56266:13146257] NSURLConnection finished with error - code -1002
2021-07-06 20:48:39.089776+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_UI_PresentPickerController data: {"m_MediaTypes":["public.movie"],"m_SourceType":2,"m_AllowsEditing":false,"m_ImageCompressionRate":0.800000011920929,"m_MaxImageSize":512,"m_EncodingType":1,"m_CameraDevice":0,"m_ModalPresentationStyle":-2}
2021-07-06 20:48:41.853466+0500 StansAssetsDemo[56266:13146085] IOSNative::Native->Unity method: didFinishPickingMedia data: {"m_MediaType":"public.movie","m_error":{"m_message":"","m_code":0},"m_MediaUrl":"file:\/\/\/private\/var\/mobile\/Containers\/Data\/Application\/7D58335B-0101-4E64-BAA3-61E8E63B7E6A\/tmp\/trim.1EF5062E-635E-42BF-99BE-986904359775.MOV"}
2021-07-06 20:48:41.859036+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_UI_PresentUIAlertController data: {"m_Id":3,"m_Title":"UIImagePickerController","m_Message":"Video Loaded!","m_PreferredStyle":1,"m_Actions":[{"m_Id":4,"m_Title":"Ok","m_Style":0,"m_Enabled":true,"m_Preferred":false,"m_Image":""}]}
2021-07-06 20:48:43.803284+0500 StansAssetsDemo[56266:13146085] IOSNative::Native->Unity method: OnUIAlertAction data: {"m_AlertId":3,"m_ActionId":4}
2021-07-06 20:48:43.806299+0500 StansAssetsDemo[56266:13146085] IOSNative::Unity->Native method: _ISN_CopyCGImageAtTime data: /var/mobile/Containers/Data/Application/7D58335B-0101-4E64-BAA3-61E8E63B7E6A/tmp/trim.1EF5062E-635E-42BF-99BE-986904359775.MOV
2021-07-06 20:48:43.814809+0500 StansAssetsDemo[56266:13146657] NSURLConnection finished with error - code -1002
Should I also send you the Xcode project?
@tahafarooq7 yes please, because this error
2021-07-06 20:48:21.834564+0500 StansAssetsDemo[56266:13146257] NSURLConnection finished with error - code -1002
should be fixed, maybe your xcode project will show what the problem does you have.
@foritari Xcode project's Google Drive's link: https://drive.google.com/drive/folders/1-MDZ6fZL_gBONU_LH34PLINwfjfVcCFx?usp=sharing
@foritari did you find any solutions? Thanks, in advance.
@foritari checking in, if you had a chance to view the project to come up with a fix. Here's the link I shared: https://drive.google.com/drive/folders/1-MDZ6fZL_gBONU_LH34PLINwfjfVcCFx?usp=sharing
@tahafarooq7 yes, this bug is already fixed, in 2021.2 version.
@foritari , yes, this bug is fixed in iOS Native Pro 2021.2 but there are now some compatibility errors. If I import both iOS Native Pro and Ulimate Mobile Pro assets then there are errors. The iOS Native Pro 2021.2 is available but for Ultimate Mobile Pro the latest version available is 2021.1. It does not matter which asset I import first, there are different errors.
Texture2D thumbnail = ISN_AVAssetImageGenerator.CopyCGImageAtTime(result.MediaURL, 0);