$(function () {
    new DartAsyncCallHelper().init();

    const data = window['Dart_GetLiveData'](0); //调dart方法必须带参数
    // const rst = toUpperCamelCase(data);
    const rst = JSON.parse(data);

    startLive(rst, onBeforeReconnect);

    async function onBeforeReconnect() {
        var result = await window.dartCaller.callAsync(
            'checkLiveState',
            rst.DeviceCode,
        );
        return result;
    }
});
