# OpenUrlEvent

public delegate void OpenUrlEvent(string url, int screenType, bool isFullScreen, bool isBrowser);

1.回调描述

打开挂件内链接的回调,一般使用游戏内WebView,如:MSDKWebView

2.传入参数

参数 类型 含义
url String 网络链接
screenType int 屏幕显示类型 1 默认 2 竖屏 3 横屏
isFullScreen bool 是否全屏
isBrowser bool 是否使用系统自带的浏览器打开链接

3.代码示例

mJetPackEngine.livePush.OnOpenUrlEvent += OnOpenUrl;

void OnOpenUrl(string url, int screenType, bool isFullScreen, bool isBrowser)
{
    //MSDK V5
    MSDKWebView.OpenUrl(url, (MSDKWebViewOrientation)screenType, isFullScreen,true, "",isBrowser);
        
    //MSDK V3
    // WGOpenUrl(liveMsg.url, (MSDKWebViewOrientation)liveMsg.screenType, liveMsg.isFullScreen);
}