我正在从视频 URL 生成缩略图,它在 Android 中工作正常,但在 IOS 中出现错误(Error: Can't write to file)
下面是我的代码。
import * as VideoThumbnails from 'expo-video-thumbnails';
var thumbnail = await VideoThumbnails.getThumbnailAsync(link, { time: 2000 });
Run Code Online (Sandbox Code Playgroud) //这是我的代码
package name.ratson.cordova.admob.rewardvideo;
import android.util.Log;
import com.google.android.gms.ads.reward.RewardItem;
import com.google.android.gms.ads.reward.RewardedVideoAdListener;
import org.json.JSONException;
import org.json.JSONObject;
import name.ratson.cordova.admob.AbstractExecutor;
class RewardVideoListener implements RewardedVideoAdListener {
private final RewardVideoExecutor executor;
RewardVideoListener(RewardVideoExecutor executor) {
this.executor = executor;
}
@Override
public void onRewardedVideoAdFailedToLoad(int errorCode) {
synchronized (executor.rewardedVideoLock) {
executor.isRewardedVideoLoading = false;
}
JSONObject data = new JSONObject();
try {
data.put("error", errorCode);
data.put("reason", AbstractExecutor.getErrorReason(errorCode));
data.put("adType", executor.getAdType());
} catch (JSONException e) {
e.printStackTrace();
}
executor.fireAdEvent("admob.rewardvideo.events.LOAD_FAIL", data);
}
@Override
public void onRewardedVideoAdLeftApplication() {
JSONObject data = new JSONObject();
try {
data.put("adType", …Run Code Online (Sandbox Code Playgroud)