videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

Share the recorded video to X with Android doesn't work #142

Closed thammin closed 3 months ago

thammin commented 3 months ago

Hi, I've recorded a video and post to X with the codes below. Posting was succeeded but the video does not play.

var asset = await MediaAsset.FromFile(filePath);
await asset.Share(text);

After that, I tried to save the same vidoe to camera roll and it worked perfectly.

var asset = await MediaAsset.FromFile(filePath);
await asset.SaveToCameraRoll();
After few investigation, these are the results. Device Method Result
iOS (IPhone13) asset.Share
iOS (IPhone13) asset.SaveToCameraRoll
Android (Pixel5a) asset.Share
Android (Pixel5a) asset.SaveToCameraRoll

Videokit 0.0.19 Unity 2022.3.21f1 Video 3seconds 1920x1080 (1.6MB)

olokobayusuf commented 3 months ago

@thammin does the video file actually playback when you view it on the device, and on a computer? If so, then it's likely an X issue.

thammin commented 3 months ago

I've found out that the recording camera stop working affected by other reason. VideoKit works perfectly after all. Thanks for the response!