package com.tencent.mm.plugin.appbrand.jsapi.media;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.appstorage.AppBrandLocalVideoObject;
import com.tencent.mm.plugin.appbrand.ipc.AppBrandProxyUIProcessTask.ProcessResult;
import com.tencent.mm.plugin.appbrand.ipc.AppBrandProxyUIProcessTask.b;
import com.tencent.mm.plugin.appbrand.jsapi.c;
import com.tencent.mm.plugin.appbrand.jsapi.media.JsApiChooseVideo.ChooseResult;
import com.tencent.mm.sdk.platformtools.ab;
import java.util.HashMap;

class JsApiChooseVideo$2 implements b<ChooseResult> {
    final /* synthetic */ int eIl;
    final /* synthetic */ JsApiChooseVideo hPQ;
    final /* synthetic */ c hxc;

    JsApiChooseVideo$2(JsApiChooseVideo jsApiChooseVideo, c cVar, int i) {
        this.hPQ = jsApiChooseVideo;
        this.hxc = cVar;
        this.eIl = i;
    }

    public final /* synthetic */ void c(ProcessResult processResult) {
        AppMethodBeat.i(131270);
        ChooseResult chooseResult = (ChooseResult) processResult;
        if (chooseResult != null) {
            switch (chooseResult.bFZ) {
                case -1:
                    AppBrandLocalVideoObject appBrandLocalVideoObject = chooseResult.hPS;
                    if (appBrandLocalVideoObject == null) {
                        ab.e("MicroMsg.JsApiChooseVideo", "choose result code is OK but videoObj null");
                        break;
                    }
                    HashMap hashMap = new HashMap();
                    hashMap.put("tempFilePath", appBrandLocalVideoObject.czD);
                    hashMap.put("duration", Integer.valueOf(appBrandLocalVideoObject.duration));
                    hashMap.put("size", Integer.valueOf(appBrandLocalVideoObject.size));
                    hashMap.put("height", Integer.valueOf(appBrandLocalVideoObject.height));
                    hashMap.put("width", Integer.valueOf(appBrandLocalVideoObject.width));
                    this.hxc.M(this.eIl, this.hPQ.j("ok", hashMap));
                    AppMethodBeat.o(131270);
                    return;
                case 0:
                    this.hxc.M(this.eIl, this.hPQ.j("cancel", null));
                    AppMethodBeat.o(131270);
                    return;
            }
        }
        this.hxc.M(this.eIl, this.hPQ.j("fail", null));
        AppMethodBeat.o(131270);
    }
}
