private void OnTargetFound(EasyAR.TargetAbstractBehaviour obj)
    {
        if (isGettingLink)
        {
            return;
        }

        if (!AppController.Inst.HaveInetConnection)
        {
            messager.SetMessege("Проблема с интернет-соединением...");
            return;
        }
        messager.SetMessege("Загрузка видео...", float.PositiveInfinity);

        isGettingLink = true;
        downloader.GetDirectLinkAsync((string directLink, bool isTimeout) => {
            isGettingLink = false;
            if (isTimeout)
            {
                messager.SetMessege("Проблема с интернет-соединением...");
                return;
            }
            player.Path    = directLink;
            needOpenPlayer = true;
        }, yandexLink);
    }
    void OnTargetFound(EasyAR.TargetAbstractBehaviour obj)
    {
        if (!AppController.Inst.HaveInetConnection)
        {
            messager.SetMessege("Проблемы с соединением...");
            return;
        }

        Application.OpenURL(link);
    }
Ejemplo n.º 3
0
    void OnTargetFound(EasyAR.TargetAbstractBehaviour obj)
    {
        if (downloader.IsDownloading)
        {
            return;
        }

        if (!AppController.Inst.HaveInetConnection)
        {
            messager.SetMessege("Проблемы с соединением...");
            return;
        }

        messager.SetMessege("Загрузка...", float.PositiveInfinity);
        downloader.DownloadFileAsync(OnDownloadComplete, OnDownloadProgressChanged, yandexLink, localPath);
    }