package com.mbridge.msdk.video.bt.module; import android.content.Context; import android.content.res.Configuration; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Base64; import android.view.View; import android.webkit.WebView; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; import com.iab.omid.library.mmadbridge.adsession.AdEvents; import com.iab.omid.library.mmadbridge.adsession.AdSession; import com.iab.omid.library.mmadbridge.adsession.FriendlyObstructionPurpose; import com.iab.omid.library.mmadbridge.adsession.media.InteractionType; import com.iab.omid.library.mmadbridge.adsession.media.MediaEvents; import com.ironsource.mediationsdk.utils.IronSourceConstants; import com.mbridge.msdk.dycreator.baseview.cusview.SoundImageView; import com.mbridge.msdk.foundation.controller.c; import com.mbridge.msdk.foundation.d.b; import com.mbridge.msdk.foundation.entity.CampaignEx; import com.mbridge.msdk.foundation.same.report.d.e; import com.mbridge.msdk.foundation.tools.af; import com.mbridge.msdk.foundation.tools.ak; import com.mbridge.msdk.foundation.tools.ap; import com.mbridge.msdk.foundation.tools.x; import com.mbridge.msdk.mbsignalcommon.windvane.g; import com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener; import com.mbridge.msdk.playercommon.PlayerErrorConstant; import com.mbridge.msdk.playercommon.PlayerView; import com.mbridge.msdk.video.bt.a.d; import com.mbridge.msdk.widget.FeedBackButton; import java.io.File; import org.json.JSONObject; /* loaded from: classes4.dex */ public class MBridgeBTVideoView extends BTBaseView { private static boolean K; private static long Q; private AdSession A; private AdEvents B; private MediaEvents C; private a D; private int E; private int F; private boolean G; private int H; private int I; private String J; private boolean L; private boolean M; private boolean N; private RelativeLayout O; private ProgressBar P; private PlayerView p; private SoundImageView q; private TextView r; private View s; private FeedBackButton t; private ImageView u; private WebView v; private com.mbridge.msdk.videocommon.download.a w; private int x; private int y; private int z; public AdEvents getAdEvents() { return this.B; } public AdSession getAdSession() { return this.A; } public int getMute() { return this.E; } public MediaEvents getVideoEvents() { return this.C; } public void setAdEvents(AdEvents adEvents) { this.B = adEvents; } public void setAdSession(AdSession adSession) { this.A = adSession; } public void setCreateWebView(WebView webView) { this.v = webView; } public void setOrientation(int i) { this.I = i; } public void setShowClose(int i) { this.y = i; } public void setShowMute(int i) { this.z = i; } public void setShowTime(int i) { this.x = i; } public void setVideoEvents(MediaEvents mediaEvents) { this.C = mediaEvents; a aVar = this.D; if (aVar != null) { aVar.c = mediaEvents; } PlayerView playerView = this.p; if (playerView != null) { playerView.setVideoEvents(mediaEvents); } } public MBridgeBTVideoView(Context context) { super(context); this.x = 0; this.y = 0; this.z = 0; this.E = 2; this.G = false; this.H = 2; this.I = 1; this.L = false; this.M = false; this.N = false; } public MBridgeBTVideoView(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.x = 0; this.y = 0; this.z = 0; this.E = 2; this.G = false; this.H = 2; this.I = 1; this.L = false; this.M = false; this.N = false; } @Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); } @Override // com.mbridge.msdk.video.bt.module.BTBaseView public void setCampaign(CampaignEx campaignEx) { super.setCampaign(campaignEx); if (campaignEx != null && campaignEx.getVideoCompleteTime() > 0) { this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_video_time_count_num_bg", "drawable")); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, ak.a(c.m().c(), 30.0f)); int a2 = ak.a(c.m().c(), 5.0f); layoutParams.setMargins(a2, 0, 0, 0); this.r.setPadding(a2, 0, a2, 0); this.r.setLayoutParams(layoutParams); return; } this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_shape_progress", "drawable")); this.r.setWidth(ak.a(c.m().c(), 30.0f)); } public void soundOperate(int i, int i2, String str) { if (this.h) { this.E = i; if (i == 1) { this.q.setSoundStatus(false); this.p.closeSound(); } else if (i == 2) { this.q.setSoundStatus(true); this.p.openSound(); } if (i2 == 1) { this.q.setVisibility(8); } else if (i2 == 2) { this.q.setVisibility(0); } MediaEvents mediaEvents = this.C; if (mediaEvents != null) { try { mediaEvents.volumeChange(this.p.getVolume()); } catch (Exception e) { af.b("omsdk", e.getMessage()); } } } } @Override // com.mbridge.msdk.video.bt.module.BTBaseView public void init(Context context) { int findLayout = findLayout("mbridge_reward_videoview_item"); if (findLayout > 0) { this.f.inflate(findLayout, this); boolean c = c(); this.h = c; if (!c) { af.b(BTBaseView.TAG, "MBridgeVideoView init fail"); } a(); } K = false; } public void onResume() { PlayerView playerView = this.p; if (playerView != null) { playerView.setDesk(true); this.p.setIsCovered(false); if (this.M) { this.p.start(true); } this.p.resumeOMSDK(); } } public void onPause() { PlayerView playerView = this.p; if (playerView != null) { boolean isPlayIng = playerView.isPlayIng(); this.M = isPlayIng; this.p.setIsBTVideoPlaying(isPlayIng); MediaEvents mediaEvents = this.C; if (mediaEvents != null) { this.p.setVideoEvents(mediaEvents); } this.p.onPause(); } } public void onStop() { PlayerView playerView = this.p; if (playerView != null) { playerView.setIsCovered(true); } } @Override // android.view.ViewGroup, android.view.View public void onAttachedToWindow() { View rootView; super.onAttachedToWindow(); if (!this.N) { this.H = d.c().e(this.c); } View view = this.s; if (view != null) { view.setVisibility(this.y == 0 ? 8 : 0); } SoundImageView soundImageView = this.q; if (soundImageView != null) { soundImageView.setVisibility(this.z == 0 ? 8 : 0); } CampaignEx campaignEx = this.b; if (campaignEx != null) { campaignEx.setCampaignUnitId(this.c); b.a().a(this.c + "_1", this.b); } TextView textView = this.r; if (textView != null) { textView.setVisibility(this.x == 0 ? 8 : 0); if (this.r.getVisibility() == 0 && b.a().b()) { b.a().a(this.c + "_1", this.t); } } if (this.A == null || (rootView = getRootView()) == null) { return; } this.A.removeFriendlyObstruction(rootView); } public boolean playMute() { try { PlayerView playerView = this.p; if (playerView != null && this.v != null) { playerView.closeSound(); this.q.setSoundStatus(false); this.E = 1; try { MediaEvents mediaEvents = this.C; if (mediaEvents != null) { mediaEvents.volumeChange(0.0f); } } catch (Exception e) { af.a("OMSDK", e.getMessage()); } BTBaseView.a(this.v, "onPlayerMute", this.d); return true; } } catch (Exception e2) { af.b(BTBaseView.TAG, e2.getMessage()); } return false; } public boolean playUnMute() { try { PlayerView playerView = this.p; if (playerView == null || this.v == null) { return false; } playerView.openSound(); this.q.setSoundStatus(true); this.E = 2; try { MediaEvents mediaEvents = this.C; if (mediaEvents != null) { mediaEvents.volumeChange(1.0f); } } catch (Exception e) { af.a("OMSDK", e.getMessage()); } BTBaseView.a(this.v, "onUnmute", this.d); return true; } catch (Exception e2) { af.b(BTBaseView.TAG, e2.getMessage()); return false; } } public void play() { a aVar; try { if (!this.N) { String d = d(); this.J = d; this.p.initVFPData(d, this.b.getVideoUrlEncode(), this.D); if (this.H == 1) { playMute(); } else { playUnMute(); } try { if (this.B != null) { af.b("omsdk", "bt impressionOccurred"); this.B.impressionOccurred(); } } catch (Throwable th) { af.a(BTBaseView.TAG, th.getMessage()); } if (!this.p.playVideo() && (aVar = this.D) != null) { aVar.onPlayError("play video failed"); } this.N = true; return; } if (this.G) { this.p.playVideo(0); this.G = false; } else { this.p.start(false); } try { MediaEvents mediaEvents = this.C; if (mediaEvents != null) { mediaEvents.resume(); af.a("omsdk", "btv play2: videoEvents.resume()"); } } catch (Throwable th2) { af.a(BTBaseView.TAG, th2.getMessage()); } WebView webView = this.v; if (webView != null) { BTBaseView.a(webView, "onPlayerPlay", this.d); return; } return; } catch (Exception e) { af.b(BTBaseView.TAG, e.getMessage(), e); } af.b(BTBaseView.TAG, e.getMessage(), e); } public void resume() { try { PlayerView playerView = this.p; if (playerView != null) { if (this.G) { playerView.playVideo(0); this.G = false; } else { playerView.onResume(); } try { MediaEvents mediaEvents = this.C; if (mediaEvents != null) { mediaEvents.resume(); af.a("omsdk", "btv play3: videoEvents.resume()"); } } catch (Throwable th) { af.a(BTBaseView.TAG, th.getMessage()); } WebView webView = this.v; if (webView != null) { BTBaseView.a(webView, "onPlayerResume", this.d); } } } catch (Exception e) { af.b(BTBaseView.TAG, e.getMessage()); } } public void pause() { try { PlayerView playerView = this.p; if (playerView != null) { playerView.pause(); WebView webView = this.v; if (webView != null) { BTBaseView.a(webView, "onPlayerPause", this.d); } } } catch (Exception e) { af.b(BTBaseView.TAG, e.getMessage(), e); } } public void stop() { try { PlayerView playerView = this.p; if (playerView != null) { playerView.pause(); this.p.stop(); this.G = true; WebView webView = this.v; if (webView != null) { BTBaseView.a(webView, "onPlayerStop", this.d); } } } catch (Exception e) { af.b(BTBaseView.TAG, e.getMessage(), e); } } @Override // com.mbridge.msdk.video.bt.module.BTBaseView public void onDestory() { try { if (this.p != null) { AdSession adSession = this.A; if (adSession != null) { adSession.finish(); } this.p.setOnClickListener(null); this.p.release(); this.p = null; e eVar = new e(); eVar.a(IronSourceConstants.EVENTS_DURATION, Long.valueOf(System.currentTimeMillis() - Q)); com.mbridge.msdk.foundation.same.report.d.d.a().a("2000146", this.b, eVar); } SoundImageView soundImageView = this.q; if (soundImageView != null) { soundImageView.setOnClickListener(null); } View view = this.s; if (view != null) { view.setOnClickListener(null); } if (this.v != null) { this.v = null; } if (this.A != null) { this.A = null; } if (this.C != null) { this.C = null; } setOnClickListener(null); } catch (Throwable th) { af.a(BTBaseView.TAG, th.getMessage()); } } private boolean c() { try { this.p = (PlayerView) findViewById(findID("mbridge_vfpv")); this.q = (SoundImageView) findViewById(findID("mbridge_sound_switch")); this.r = (TextView) findViewById(findID("mbridge_tv_count")); this.s = findViewById(findID("mbridge_rl_playing_close")); this.O = (RelativeLayout) findViewById(findID("mbridge_top_control")); this.P = (ProgressBar) findViewById(findID("mbridge_video_progress_bar")); this.p.setIsBTVideo(true); this.t = (FeedBackButton) findViewById(findID("mbridge_native_endcard_feed_btn")); this.u = (ImageView) findViewById(findID("mbridge_iv_link")); return isNotNULL(this.p, this.q, this.r, this.s); } catch (Throwable th) { af.b(BTBaseView.TAG, th.getMessage(), th); return false; } } private String d() { String str = ""; try { str = this.b.getVideoUrlEncode(); com.mbridge.msdk.videocommon.download.a aVar = this.w; if (aVar == null) { return str; } String h = aVar.h(); return !ap.a(h) ? new File(h).exists() ? h : str : str; } catch (Throwable th) { af.b(BTBaseView.TAG, th.getMessage(), th); return str; } } private int e() { try { com.mbridge.msdk.videocommon.d.a b = com.mbridge.msdk.videocommon.d.b.a().b(); if (b == null) { com.mbridge.msdk.videocommon.d.b.a().c(); } r0 = b != null ? (int) b.h() : 5; af.c(BTBaseView.TAG, "MBridgeBaseView buffetTimeout:" + r0); } catch (Throwable th) { th.printStackTrace(); } return r0; } @Override // com.mbridge.msdk.video.bt.module.BTBaseView public final void a() { super.a(); if (this.h) { this.q.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.1 @Override // android.view.View.OnClickListener public final void onClick(View view) { boolean isSilent = MBridgeBTVideoView.this.p.isSilent(); if (MBridgeBTVideoView.this.v != null) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put("code", BTBaseView.n); jSONObject.put("id", MBridgeBTVideoView.this.d); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put(CampaignEx.JSON_NATIVE_VIDEO_MUTE, MBridgeBTVideoView.this.E); jSONObject.put("data", jSONObject2); g.a().a(MBridgeBTVideoView.this.v, "onPlayerMuteBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2)); af.a("OperateViews", "onPlayerMuteBtnClicked isMute = " + isSilent + " mute = " + MBridgeBTVideoView.this.E); } catch (Exception e) { d.c().a(MBridgeBTVideoView.this.v, e.getMessage()); } } } }); this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.2 @Override // android.view.View.OnClickListener public final void onClick(View view) { if (MBridgeBTVideoView.this.v != null) { BTBaseView.a(MBridgeBTVideoView.this.v, "onPlayerCloseBtnClicked", MBridgeBTVideoView.this.d); } } }); setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.3 @Override // android.view.View.OnClickListener public final void onClick(View view) { if (MBridgeBTVideoView.this.C != null) { try { MBridgeBTVideoView.this.C.adUserInteraction(InteractionType.CLICK); af.a("omsdk", "btv adUserInteraction click"); } catch (Exception e) { af.b("omsdk", e.getMessage()); } } if (MBridgeBTVideoView.this.v != null) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put("code", BTBaseView.n); jSONObject.put("id", MBridgeBTVideoView.this.d); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("x", String.valueOf(view.getX())); jSONObject2.put("y", String.valueOf(view.getY())); jSONObject.put("data", jSONObject2); g.a().a(MBridgeBTVideoView.this.v, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2)); } catch (Exception unused) { d.c().a(MBridgeBTVideoView.this.v, "onClicked", MBridgeBTVideoView.this.d); } } } }); } } public static final class a extends DefaultVideoPlayerStatusListener { private MBridgeBTVideoView a; private WebView b; private MediaEvents c; private String d; private String e; private int f; private int g; private boolean h; private int l; private int m; private boolean i = false; private boolean j = false; private boolean k = false; private boolean n = false; private boolean o = false; public a(MBridgeBTVideoView mBridgeBTVideoView, WebView webView, MediaEvents mediaEvents) { this.a = mBridgeBTVideoView; this.b = webView; this.c = mediaEvents; if (mBridgeBTVideoView != null) { this.d = mBridgeBTVideoView.d; this.e = mBridgeBTVideoView.c; } } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onPlayStarted(int i) { super.onPlayStarted(i); if (!this.h) { this.a.P.setMax(i); WebView webView = this.b; if (webView != null) { BTBaseView.a(webView, "onPlayerPlay", this.d); } this.h = true; if (this.c != null) { try { MBridgeBTVideoView mBridgeBTVideoView = this.a; this.c.start(i, (mBridgeBTVideoView == null || mBridgeBTVideoView.p == null) ? 0.0f : this.a.p.getVolume()); af.a("omsdk", "play2: videoEvents.start()"); } catch (Exception e) { af.b("omsdk", e.getMessage()); } } } boolean unused = MBridgeBTVideoView.K = false; } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onPlayCompleted() { super.onPlayCompleted(); MBridgeBTVideoView mBridgeBTVideoView = this.a; CampaignEx campaignEx = mBridgeBTVideoView.b; if (campaignEx == null) { mBridgeBTVideoView.r.setText("0"); } else if (campaignEx.getVideoCompleteTime() > 0) { this.a.r.setText(x.a(c.m().c(), "mbridge_reward_video_view_reward_time_complete", "string")); } else { this.a.r.setText("0"); } this.a.p.setClickable(false); WebView webView = this.b; if (webView != null) { BTBaseView.a(webView, "onPlayerFinish", this.d); } MediaEvents mediaEvents = this.c; if (mediaEvents != null) { mediaEvents.complete(); af.a("omsdk", "play: videoEvents.complete()"); } this.f = this.g; boolean unused = MBridgeBTVideoView.K = true; this.a.stop(); } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onPlayError(String str) { super.onPlayError(str); if (this.b != null) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put("code", BTBaseView.o); jSONObject.put("id", this.d); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("error", str); jSONObject2.put("id", this.d); jSONObject.put("data", jSONObject2); g.a().a(this.b, "onPlayerFailed", Base64.encodeToString(jSONObject.toString().getBytes(), 2)); } catch (Exception e) { d.c().a(this.b, e.getMessage()); } } } /* JADX WARN: Removed duplicated region for block: B:90:0x02c7 A[Catch: Exception -> 0x028f, TRY_LEAVE, TryCatch #0 {Exception -> 0x028f, blocks: (B:70:0x0239, B:72:0x023d, B:78:0x0245, B:80:0x0249, B:82:0x024d, B:84:0x0259, B:87:0x0264, B:88:0x02bb, B:90:0x02c7, B:94:0x0291), top: B:69:0x0239 }] */ /* JADX WARN: Removed duplicated region for block: B:93:? A[RETURN, SYNTHETIC] */ @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void onPlayProgress(int r11, int r12) { /* Method dump skipped, instructions count: 750 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.onPlayProgress(int, int):void"); } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onBufferingStart(String str) { try { af.b("omsdk", "bt onBufferingStart1"); super.onBufferingStart(str); if (this.c != null) { af.b("omsdk", "bt onBufferingStart"); this.c.bufferStart(); this.o = true; } if ((str.equals(PlayerErrorConstant.PREPARE_TIMEOUT) || str.equals(PlayerErrorConstant.PLAYERING_TIMEOUT)) && this.b != null) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put("code", BTBaseView.n); jSONObject.put("id", this.d); jSONObject.put("data", new JSONObject()); g.a().a(this.b, "onPlayerTimeout", Base64.encodeToString(jSONObject.toString().getBytes(), 2)); } catch (Exception e) { d.c().a(this.b, e.getMessage()); } } } catch (Exception e2) { e2.printStackTrace(); } } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onBufferingEnd() { try { super.onBufferingEnd(); if (this.c == null || !this.o) { return; } af.b("omsdk", "bt onBufferingEnd"); this.o = false; this.c.bufferFinish(); } catch (Exception e) { e.printStackTrace(); } } @Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener public final void onPlaySetDataSourceError(String str) { super.onPlaySetDataSourceError(str); } /* JADX WARN: Removed duplicated region for block: B:23:0x00a7 A[Catch: Exception -> 0x006f, TryCatch #0 {Exception -> 0x006f, blocks: (B:15:0x002f, B:17:0x0037, B:20:0x0044, B:21:0x009b, B:23:0x00a7, B:25:0x00b1, B:31:0x0071), top: B:14:0x002f }] */ /* JADX WARN: Removed duplicated region for block: B:30:? A[RETURN, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void a(int r3, int r4) { /* r2 = this; java.lang.String r0 = "DefaultVideoPlayerStatusListener" r2.l = r3 r2.m = r4 com.mbridge.msdk.foundation.tools.ah r3 = com.mbridge.msdk.foundation.tools.ah.a() java.lang.String r4 = "h_c_r_w_p_c" r1 = 0 boolean r3 = r3.a(r4, r1) if (r3 != 0) goto L15 goto Lc2 L15: int r3 = r2.l r4 = 100 if (r3 == r4) goto Lc2 int r4 = r2.m if (r4 != 0) goto Lc2 boolean r4 = r2.n if (r4 != 0) goto Lc2 if (r3 == 0) goto Lc2 com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a if (r3 == 0) goto Lc2 com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b if (r3 != 0) goto L2f goto Lc2 L2f: int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f r4 = 94 if (r3 == r4) goto L71 com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b // Catch: java.lang.Exception -> L6f int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f r4 = 287(0x11f, float:4.02E-43) if (r3 != r4) goto L44 goto L71 L44: java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f r3.() // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getBidToken() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f goto L9b L6f: r3 = move-exception goto Lb7 L71: java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f r3.() // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getRequestId() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f r3.append(r4) // Catch: java.lang.Exception -> L6f java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f L9b: com.mbridge.msdk.videocommon.download.b r4 = com.mbridge.msdk.videocommon.download.b.getInstance() // Catch: java.lang.Exception -> L6f java.lang.String r1 = r2.e // Catch: java.lang.Exception -> L6f com.mbridge.msdk.videocommon.download.a r3 = r4.a(r1, r3) // Catch: java.lang.Exception -> L6f if (r3 == 0) goto Lc2 r3.p() // Catch: java.lang.Exception -> L6f r3 = 1 r2.n = r3 // Catch: java.lang.Exception -> L6f boolean r3 = com.mbridge.msdk.MBridgeConstans.DEBUG // Catch: java.lang.Exception -> L6f if (r3 == 0) goto Lc2 java.lang.String r3 = "CDRate is : 0 and start download when player create!" com.mbridge.msdk.foundation.tools.af.b(r0, r3) // Catch: java.lang.Exception -> L6f goto Lc2 Lb7: boolean r4 = com.mbridge.msdk.MBridgeConstans.DEBUG if (r4 == 0) goto Lc2 java.lang.String r3 = r3.getMessage() com.mbridge.msdk.foundation.tools.af.b(r0, r3) Lc2: return */ throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.a(int, int):void"); } } public void setSoundImageViewVisble(int i) { this.q.setVisibility(i == 0 ? 4 : 0); } public void setCountDownTextViewVisable(int i) { this.r.setVisibility(i == 0 ? 4 : 0); } public void setCloseViewVisable(int i) { this.s.setVisibility(i == 0 ? 4 : 0); } public void setProgressBarState(int i) { ProgressBar progressBar = this.P; if (progressBar != null) { progressBar.setVisibility(i == 0 ? 8 : 0); CampaignEx campaignEx = this.b; if (campaignEx == null || campaignEx.getProgressBarShow() != 1) { return; } this.P.setVisibility(0); } } /* JADX INFO: Access modifiers changed from: private */ public static String b(int i, int i2) { if (i2 != 0) { try { return ak.a(Double.valueOf(i / i2)) + ""; } catch (Throwable th) { th.printStackTrace(); } } return i2 + ""; } public void setVolume(float f, float f2) { PlayerView playerView = this.p; if (playerView != null) { playerView.setVolume(f, f2); } } public void setPlaybackParams(float f) { PlayerView playerView = this.p; if (playerView != null) { playerView.setPlaybackParams(f); } } public void setNotchPadding(int i, int i2, int i3, int i4) { if (i <= 0) { i = this.O.getPaddingLeft(); } if (i2 <= 0) { i2 = this.O.getPaddingRight(); } if (i3 <= 0) { i3 = this.O.getPaddingTop(); } if (i4 <= 0) { i4 = this.O.getPaddingBottom(); } af.b(BTBaseView.TAG, "NOTCH BTVideoView " + String.format("%1s-%2s-%3s-%4s", Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4))); this.O.setPadding(i, i3, i2, i4); } public void preLoadData() { String str; int r; if (this.b.getAdType() == 94 || this.b.getAdType() == 287) { str = this.b.getRequestId() + this.b.getId() + this.b.getVideoUrlEncode(); } else { str = this.b.getId() + this.b.getVideoUrlEncode() + this.b.getBidToken(); } com.mbridge.msdk.videocommon.download.a a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.c, str); if (a2 != null) { this.w = a2; } this.F = e(); String d = d(); this.J = d; if (this.h && !TextUtils.isEmpty(d) && this.b != null) { AdSession adSession = this.A; if (adSession != null) { adSession.registerAdView(this.p); AdSession adSession2 = this.A; SoundImageView soundImageView = this.q; FriendlyObstructionPurpose friendlyObstructionPurpose = FriendlyObstructionPurpose.OTHER; adSession2.addFriendlyObstruction(soundImageView, friendlyObstructionPurpose, null); this.A.addFriendlyObstruction(this.r, friendlyObstructionPurpose, null); this.A.addFriendlyObstruction(this.s, FriendlyObstructionPurpose.VIDEO_CONTROLS, null); } a aVar = new a(this, this.v, this.C); this.D = aVar; CampaignEx campaignEx = this.b; if (campaignEx != null) { if (campaignEx.getReady_rate() != -1) { r = campaignEx.getReady_rate(); } else { r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r(); } } else { r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r(); } aVar.a(r, com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).s()); this.p.setDesk(false); this.p.initBufferIngParam(this.F); soundOperate(this.E, -1, null); } K = false; } }