TXAVPlayer.smali
.class public Lcom/tx/liteav/trtc/TXAVPlayer;
.super Lcom/taobao/weex/ui/component/WXComponent;
.source "SourceFile"
# interfaces
.implements Lcom/tencent/rtmp/ITXLivePlayListener;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/taobao/weex/ui/component/WXComponent<",
"Lcom/tencent/rtmp/ui/TXCloudVideoView;",
">;",
"Lcom/tencent/rtmp/ITXLivePlayListener;"
}
.end annotation
# static fields
.field private static final CACHE_TIME_FAST:F = 1.0f
.field private static final CACHE_TIME_SMOOTH:F = 5.0f
# instance fields
.field private _playModel:Ljava/lang/Integer;
.field private _playRotation:Ljava/lang/Integer;
.field private _playType:Ljava/lang/Integer;
.field private _statechange:Ljava/lang/Boolean;
.field private _url:Ljava/lang/String;
.field private callback:Lcom/taobao/weex/bridge/JSCallback;
.field private mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
.field private mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
# direct methods
.method public constructor <init>(Lcom/taobao/weex/WXSDKInstance;Lcom/taobao/weex/ui/component/WXVContainer;ILcom/taobao/weex/ui/action/BasicComponentData;)V
.registers 5
invoke-direct {p0, p1, p2, p3, p4}, Lcom/taobao/weex/ui/component/WXComponent;-><init>(Lcom/taobao/weex/WXSDKInstance;Lcom/taobao/weex/ui/component/WXVContainer;ILcom/taobao/weex/ui/action/BasicComponentData;)V
return-void
.end method
.method public constructor <init>(Lcom/taobao/weex/WXSDKInstance;Lcom/taobao/weex/ui/component/WXVContainer;Lcom/taobao/weex/ui/action/BasicComponentData;)V
.registers 4
invoke-direct {p0, p1, p2, p3}, Lcom/taobao/weex/ui/component/WXComponent;-><init>(Lcom/taobao/weex/WXSDKInstance;Lcom/taobao/weex/ui/component/WXVContainer;Lcom/taobao/weex/ui/action/BasicComponentData;)V
return-void
.end method
.method private checkPlayUrl(Ljava/lang/String;)Z
.registers 7
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_6a
const-string v0, "http://"
invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
const-string v3, "rtmp://"
const-string v4, "https://"
if-nez v2, :cond_28
invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_28
invoke-virtual {p1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_28
const-string v2, "/"
invoke-virtual {p1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_28
goto :goto_6a
:cond_28
invoke-virtual {p1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
const/4 v3, 0x1
if-eqz v2, :cond_36
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
:goto_33
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playType:Ljava/lang/Integer;
goto :goto_69
:cond_36
invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_42
invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_4f
:cond_42
const-string v1, ".flv"
invoke-virtual {p1, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_4f
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
goto :goto_33
:cond_4f
invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_5b
invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_69
:cond_5b
const-string v0, ".m3u8"
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result p1
if-eqz p1, :cond_69
const/4 p1, 0x3
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
goto :goto_33
:cond_69
:goto_69
return v3
:cond_6a
:goto_6a
return v1
.end method
# virtual methods
.method public addEvent(Ljava/lang/String;)V
.registers 3
invoke-super {p0, p1}, Lcom/taobao/weex/ui/component/WXComponent;->addEvent(Ljava/lang/String;)V
const-string v0, "statechange"
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_f
sget-object p1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_statechange:Ljava/lang/Boolean;
:cond_f
return-void
.end method
.method public bridge synthetic initComponentHostView(Landroid/content/Context;)Landroid/view/View;
.registers 2
invoke-virtual {p0, p1}, Lcom/tx/liteav/trtc/TXAVPlayer;->initComponentHostView(Landroid/content/Context;)Lcom/tencent/rtmp/ui/TXCloudVideoView;
move-result-object p1
return-object p1
.end method
.method public initComponentHostView(Landroid/content/Context;)Lcom/tencent/rtmp/ui/TXCloudVideoView;
.registers 3
new-instance v0, Lcom/tencent/rtmp/ui/TXCloudVideoView;
invoke-direct {v0, p1}, Lcom/tencent/rtmp/ui/TXCloudVideoView;-><init>(Landroid/content/Context;)V
return-object v0
.end method
.method public bridge synthetic onHostViewInitialized(Landroid/view/View;)V
.registers 2
check-cast p1, Lcom/tencent/rtmp/ui/TXCloudVideoView;
invoke-virtual {p0, p1}, Lcom/tx/liteav/trtc/TXAVPlayer;->onHostViewInitialized(Lcom/tencent/rtmp/ui/TXCloudVideoView;)V
return-void
.end method
.method public onHostViewInitialized(Lcom/tencent/rtmp/ui/TXCloudVideoView;)V
.registers 3
invoke-super {p0, p1}, Lcom/taobao/weex/ui/component/WXComponent;->onHostViewInitialized(Landroid/view/View;)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-nez p1, :cond_15
new-instance p1, Lcom/tencent/rtmp/TXLivePlayer;
invoke-virtual {p0}, Lcom/taobao/weex/ui/component/WXComponent;->getContext()Landroid/content/Context;
move-result-object v0
invoke-direct {p1, v0}, Lcom/tencent/rtmp/TXLivePlayer;-><init>(Landroid/content/Context;)V
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
invoke-virtual {p1, p0}, Lcom/tencent/rtmp/TXLivePlayer;->setPlayListener(Lcom/tencent/rtmp/ITXLivePlayListener;)V
:cond_15
new-instance p1, Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-direct {p1}, Lcom/tencent/rtmp/TXLivePlayConfig;-><init>()V
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
return-void
.end method
.method public onNetStatus(Landroid/os/Bundle;)V
.registers 2
return-void
.end method
.method public onPlayEvent(ILandroid/os/Bundle;)V
.registers 7
new-instance v0, Lcom/alibaba/fastjson/JSONObject;
invoke-direct {v0}, Lcom/alibaba/fastjson/JSONObject;-><init>()V
:try_start_5
invoke-virtual {p2}, Landroid/os/Bundle;->keySet()Ljava/util/Set;
move-result-object v1
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
:catch_d
:goto_d
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_21
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
:try_end_19
.catch Lcom/alibaba/fastjson/JSONException; {:try_start_5 .. :try_end_19} :catch_3a
:try_start_19
invoke-virtual {p2, v2}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lcom/alibaba/fastjson/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
:try_end_20
.catch Lcom/alibaba/fastjson/JSONException; {:try_start_19 .. :try_end_20} :catch_d
goto :goto_d
:cond_21
const-string p2, "EvtID"
:try_start_23
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
invoke-virtual {v0, p2, p1}, Lcom/alibaba/fastjson/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
new-instance p1, Lcom/alibaba/fastjson/JSONObject;
invoke-direct {p1}, Lcom/alibaba/fastjson/JSONObject;-><init>()V
const-string p2, "detail"
invoke-virtual {p1, p2, v0}, Lcom/alibaba/fastjson/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
const-string p2, "statechange"
invoke-virtual {p0, p2, p1}, Lcom/taobao/weex/ui/component/WXComponent;->fireEvent(Ljava/lang/String;Ljava/util/Map;)V
:try_end_39
.catch Lcom/alibaba/fastjson/JSONException; {:try_start_23 .. :try_end_39} :catch_3a
goto :goto_3e
:catch_3a
move-exception p1
invoke-virtual {p1}, Lcom/alibaba/fastjson/JSONException;->printStackTrace()V
:goto_3e
return-void
.end method
.method public pause()V
.registers 2
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-eqz v0, :cond_7
invoke-virtual {v0}, Lcom/tencent/rtmp/TXLivePlayer;->pause()V
:cond_7
return-void
.end method
.method public removeEvent(Ljava/lang/String;)V
.registers 3
invoke-super {p0, p1}, Lcom/taobao/weex/ui/component/WXComponent;->removeEvent(Ljava/lang/String;)V
const-string v0, "statechange"
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_f
sget-object p1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_statechange:Ljava/lang/Boolean;
:cond_f
return-void
.end method
.method public resume()V
.registers 2
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-eqz v0, :cond_7
invoke-virtual {v0}, Lcom/tencent/rtmp/TXLivePlayer;->resume()V
:cond_7
return-void
.end method
.method public setCacheStrategy(Ljava/lang/Integer;)V
.registers 6
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
const/high16 v0, 0x3f800000 # 1.0f
const/4 v1, 0x1
if-eqz p1, :cond_2d
const/high16 v2, 0x40a00000 # 5.0f
if-eq p1, v1, :cond_1c
const/4 v3, 0x2
if-eq p1, v3, :cond_11
goto :goto_43
:cond_11
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v1}, Lcom/tencent/rtmp/TXLivePlayConfig;->setAutoAdjustCacheTime(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v2}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMaxAutoAdjustCacheTime(F)V
goto :goto_37
:cond_1c
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
const/4 v0, 0x0
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayConfig;->setAutoAdjustCacheTime(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v2}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMaxAutoAdjustCacheTime(F)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v2}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMinAutoAdjustCacheTime(F)V
goto :goto_3c
:cond_2d
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v1}, Lcom/tencent/rtmp/TXLivePlayConfig;->setAutoAdjustCacheTime(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMaxAutoAdjustCacheTime(F)V
:goto_37
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMinAutoAdjustCacheTime(F)V
:goto_3c
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayer;->setConfig(Lcom/tencent/rtmp/TXLivePlayConfig;)V
:goto_43
return-void
.end method
.method public setConfig(Lcom/alibaba/fastjson/JSONObject;)V
.registers 14
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
const-string v0, "enableAEC"
invoke-virtual {p1, v0}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v1
const/4 v2, 0x0
if-eqz v1, :cond_12
invoke-virtual {p1, v0}, Lcom/alibaba/fastjson/JSONObject;->getBoolean(Ljava/lang/String;)Ljava/lang/Boolean;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
goto :goto_13
:cond_12
move v0, v2
:goto_13
const/4 v1, 0x0
const-string v3, "cacheTime"
invoke-virtual {p1, v3}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_24
invoke-virtual {p1, v3}, Lcom/alibaba/fastjson/JSONObject;->getFloat(Ljava/lang/String;)Ljava/lang/Float;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Float;->floatValue()F
move-result v1
:cond_24
const-string v3, "bAutoAdjustCacheTime"
invoke-virtual {p1, v3}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_35
invoke-virtual {p1, v3}, Lcom/alibaba/fastjson/JSONObject;->getBoolean(Ljava/lang/String;)Ljava/lang/Boolean;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z
move-result v3
goto :goto_36
:cond_35
move v3, v2
:goto_36
const/high16 v4, 0x40a00000 # 5.0f
const-string v5, "maxAutoAdjustCacheTime"
invoke-virtual {p1, v5}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_48
invoke-virtual {p1, v5}, Lcom/alibaba/fastjson/JSONObject;->getFloat(Ljava/lang/String;)Ljava/lang/Float;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/Float;->floatValue()F
move-result v4
:cond_48
const/high16 v5, 0x3f800000 # 1.0f
const-string v6, "minAutoAdjustCacheTime"
invoke-virtual {p1, v6}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_5a
invoke-virtual {p1, v6}, Lcom/alibaba/fastjson/JSONObject;->getFloat(Ljava/lang/String;)Ljava/lang/Float;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/Float;->floatValue()F
move-result v5
:cond_5a
const/16 v6, 0x320
const-string v7, "videoBlockThreshold"
invoke-virtual {p1, v7}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_6c
invoke-virtual {p1, v7}, Lcom/alibaba/fastjson/JSONObject;->getInteger(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
:cond_6c
const-string v7, "connectRetryCount"
invoke-virtual {p1, v7}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v8
const/4 v9, 0x3
if-eqz v8, :cond_7e
invoke-virtual {p1, v7}, Lcom/alibaba/fastjson/JSONObject;->getInteger(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I
move-result v7
goto :goto_7f
:cond_7e
move v7, v9
:goto_7f
const-string v8, "connectRetryInterval"
invoke-virtual {p1, v8}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v10
if-eqz v10, :cond_8f
invoke-virtual {p1, v8}, Lcom/alibaba/fastjson/JSONObject;->getInteger(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v8
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
move-result v9
:cond_8f
const-string v8, "enableMessage"
invoke-virtual {p1, v8}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v10
if-eqz v10, :cond_a0
invoke-virtual {p1, v8}, Lcom/alibaba/fastjson/JSONObject;->getBoolean(Ljava/lang/String;)Ljava/lang/Boolean;
move-result-object v8
invoke-virtual {v8}, Ljava/lang/Boolean;->booleanValue()Z
move-result v8
goto :goto_a1
:cond_a0
move v8, v2
:goto_a1
const-string v10, "enableMetaData"
invoke-virtual {p1, v10}, Lcom/alibaba/fastjson/JSONObject;->containsKey(Ljava/lang/Object;)Z
move-result v11
if-eqz v11, :cond_b1
invoke-virtual {p1, v10}, Lcom/alibaba/fastjson/JSONObject;->getBoolean(Ljava/lang/String;)Ljava/lang/Boolean;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z
move-result v2
:cond_b1
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayConfig;->setEnableAEC(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v1}, Lcom/tencent/rtmp/TXLivePlayConfig;->setCacheTime(F)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v3}, Lcom/tencent/rtmp/TXLivePlayConfig;->setAutoAdjustCacheTime(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v4}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMaxAutoAdjustCacheTime(F)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v5}, Lcom/tencent/rtmp/TXLivePlayConfig;->setMinAutoAdjustCacheTime(F)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v6}, Lcom/tencent/rtmp/TXLivePlayConfig;->setVideoBlockThreshold(I)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v7}, Lcom/tencent/rtmp/TXLivePlayConfig;->setConnectRetryCount(I)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v9}, Lcom/tencent/rtmp/TXLivePlayConfig;->setConnectRetryInterval(I)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v8}, Lcom/tencent/rtmp/TXLivePlayConfig;->setEnableMessage(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v2}, Lcom/tencent/rtmp/TXLivePlayConfig;->setEnableMetaData(Z)V
iget-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mPlayConfig:Lcom/tencent/rtmp/TXLivePlayConfig;
invoke-virtual {p1, v0}, Lcom/tencent/rtmp/TXLivePlayer;->setConfig(Lcom/tencent/rtmp/TXLivePlayConfig;)V
return-void
.end method
.method public setPlayModel(Ljava/lang/Integer;)V
.registers 2
.annotation runtime Lcom/taobao/weex/ui/component/WXComponentProp;
name = "playModel"
.end annotation
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playModel:Ljava/lang/Integer;
invoke-virtual {p0, p1}, Lcom/tx/liteav/trtc/TXAVPlayer;->setRenderMode(Ljava/lang/Integer;)V
return-void
.end method
.method public setPlayRotation(Ljava/lang/Integer;)V
.registers 2
.annotation runtime Lcom/taobao/weex/ui/component/WXComponentProp;
name = "playRotation"
.end annotation
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playRotation:Ljava/lang/Integer;
invoke-virtual {p0, p1}, Lcom/tx/liteav/trtc/TXAVPlayer;->setRenderRotation(Ljava/lang/Integer;)V
return-void
.end method
.method public setRenderMode(Ljava/lang/Integer;)V
.registers 3
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-eqz v0, :cond_b
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
invoke-virtual {v0, p1}, Lcom/tencent/rtmp/TXLivePlayer;->setRenderMode(I)V
:cond_b
return-void
.end method
.method public setRenderRotation(Ljava/lang/Integer;)V
.registers 3
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-eqz v0, :cond_b
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
invoke-virtual {v0, p1}, Lcom/tencent/rtmp/TXLivePlayer;->setRenderRotation(I)V
:cond_b
return-void
.end method
.method public setUrl(Ljava/lang/String;)V
.registers 2
.annotation runtime Lcom/taobao/weex/ui/component/WXComponentProp;
name = "url"
.end annotation
iput-object p1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_url:Ljava/lang/String;
invoke-virtual {p0}, Lcom/tx/liteav/trtc/TXAVPlayer;->startPlay()V
return-void
.end method
.method public startPlay()V
.registers 4
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_url:Ljava/lang/String;
invoke-direct {p0, v0}, Lcom/tx/liteav/trtc/TXAVPlayer;->checkPlayUrl(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_2a
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
invoke-virtual {p0}, Lcom/taobao/weex/ui/component/WXComponent;->getHostView()Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/tencent/rtmp/ui/TXCloudVideoView;
invoke-virtual {v0, v1}, Lcom/tencent/rtmp/TXLivePlayer;->setPlayerView(Lcom/tencent/rtmp/ui/TXCloudVideoView;)V
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
iget-object v1, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_url:Ljava/lang/String;
iget-object v2, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playType:Ljava/lang/Integer;
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
move-result v2
invoke-virtual {v0, v1, v2}, Lcom/tencent/rtmp/TXLivePlayer;->startLivePlay(Ljava/lang/String;I)I
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playRotation:Ljava/lang/Integer;
invoke-virtual {p0, v0}, Lcom/tx/liteav/trtc/TXAVPlayer;->setRenderRotation(Ljava/lang/Integer;)V
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->_playModel:Ljava/lang/Integer;
invoke-virtual {p0, v0}, Lcom/tx/liteav/trtc/TXAVPlayer;->setRenderMode(Ljava/lang/Integer;)V
:cond_2a
return-void
.end method
.method public startPlayWithUrl(Ljava/lang/String;I)V
.registers 5
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
invoke-virtual {p0}, Lcom/taobao/weex/ui/component/WXComponent;->getHostView()Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/tencent/rtmp/ui/TXCloudVideoView;
invoke-virtual {v0, v1}, Lcom/tencent/rtmp/TXLivePlayer;->setPlayerView(Lcom/tencent/rtmp/ui/TXCloudVideoView;)V
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
invoke-virtual {v0, p1, p2}, Lcom/tencent/rtmp/TXLivePlayer;->startLivePlay(Ljava/lang/String;I)I
return-void
.end method
.method public stopPlay()V
.registers 3
.annotation runtime Lcom/taobao/weex/annotation/JSMethod;
.end annotation
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
if-eqz v0, :cond_13
invoke-virtual {v0}, Lcom/tencent/rtmp/TXLivePlayer;->stopRecord()I
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/tencent/rtmp/TXLivePlayer;->setPlayListener(Lcom/tencent/rtmp/ITXLivePlayListener;)V
iget-object v0, p0, Lcom/tx/liteav/trtc/TXAVPlayer;->mLivePlayer:Lcom/tencent/rtmp/TXLivePlayer;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/tencent/rtmp/TXLivePlayer;->stopPlay(Z)I
:cond_13
return-void
.end method