コード例 #1
0
    public void Start()
    {
#if UNITY_WEBGL
        useNewVersion = true;
#endif

        resolver = gameObject.AddComponent <RequestResolver>();
        if (Application.isMobilePlatform)
        {
            if (GetMaxQualitySupportedByDevice() <= 720)
            {
                //low end device..
                if (videoQuality != VideoQuality.mediumQuality)
                {
                    videoQuality = VideoQuality.Hd720;
                }
                noHD = true;
            }
        }

        if (playOnStart)
        {
            PlayYoutubeVideo(videoId);
        }
    }
コード例 #2
0
    public void Start()
    {
        if (videoQuality == VideoQuality.Hd720)
        {
            noHD = true;
        }
#if UNITY_WEBGL
        useNewVersion = true;
#endif

        unityVideoPlayer.started             += VideoStarted;
        unityVideoPlayer.errorReceived       += VideoErrorReceived;
        unityVideoPlayer.frameDropped        += VideoFrameDropped;
        unityVideoPlayer.sendFrameReadyEvents = true;
        unityVideoPlayer.frameReady          += VideoFrameReady;

        resolver = gameObject.AddComponent <RequestResolver>();
        if (Application.isMobilePlatform)
        {
            if (GetMaxQualitySupportedByDevice() <= 720)
            {
                //low end device..
                if (videoQuality != VideoQuality.mediumQuality)
                {
                    videoQuality = VideoQuality.Hd720;
                }
                noHD = true;
            }
        }

        if (playOnStart)
        {
            PlayYoutubeVideo(videoId);
        }
    }
コード例 #3
0
ファイル: WildCard.cs プロジェクト: DataExperts/Dexih.Dns
        public async void Test_Txt_Request()
        {
            var url = "https://dexih.dataexpertsgroup.com";

            var httpRequest = new HttpClient();
            await httpRequest.GetAsync($"{url}/api/Remote/AddTxtRecord");

            var requestResolver = new RequestResolver(null, new DefaultHttpClientFactory(), RootAddress, new [] { "20.20.20.20" }, "dexih.com", "*****@*****.**", 123, 60, $"{url}/api/Remote/GetTxtRecords");

            var domain = new Domain("dexih.com");

            var question = new Question(domain, RecordType.TXT, RecordClass.IN);
            var request  = new Request(new Header(), new List <Question>()
            {
                question
            }, new List <IResourceRecord>());
            var resolve = await requestResolver.Resolve(request);

            var txtRecord = resolve.AnswerRecords.Where(c => c.Type == RecordType.TXT);

            Assert.True(txtRecord.Any());

            var value = Encoding.Default.GetString(txtRecord.First().Data).Substring(1);

            Assert.Equal("test0=sample value", value);
        }
コード例 #4
0
 public WebSocketConnection(WebSocket socket, Action <string> log)
 {
     Log              = Console.WriteLine;
     Socket           = socket;
     _requestResolver = new RequestResolver();
     Task.Factory.StartNew(() => MonitorConnection(socket));
 }
コード例 #5
0
    public void Start()
    {
        //if (videoQuality == VideoQuality.SD360)
        //    noHD = true;
#if UNITY_WEBGL
        getFromWebserver = true;
#endif

        unityVideoPlayer.started       += VideoStarted;
        unityVideoPlayer.errorReceived += VideoErrorReceived;
        unityVideoPlayer.frameDropped  += VideoFrameDropped;

        resolver = gameObject.AddComponent <RequestResolver>();

        //if (Application.isMobilePlatform)
        //{
        //    if (GetMaxQualitySupportedByDevice() <= 720)
        //    {
        //        //low end device..
        //        if(videoQuality != VideoQuality.mediumQuality)
        //            videoQuality = VideoQuality.Hd720;
        //        noHD = true;
        //    }
        //}

        if (playOnStart)
        {
            PlayYoutubeVideo(videoId);
        }
    }
コード例 #6
0
 public void Start()
 {
     resolver = gameObject.AddComponent <RequestResolver>();
     if (playOnStart)
     {
         PlayYoutubeVideo(videoId);
     }
 }
コード例 #7
0
 private void Start()
 {
     resolver = gameObject.AddComponent <RequestResolver>();
     if (playOnStart)
     {
         PlayVideo(videoUrl);
     }
 }
コード例 #8
0
    IEnumerator Start()
    {
        yield return(new WaitForSeconds(1));

        resolver = gameObject.AddComponent <RequestResolver>();
        unityVideoPlayer.errorReceived += PlayerError;
        yield return(new WaitForSeconds(1));

        if (playOnStart)
        {
            PlayYoutubeVideo(videoId);
        }
    }
コード例 #9
0
ファイル: YoutubeFinder.cs プロジェクト: contrejo27/Jose
        } //END Start

        //------------------------------------//
        public void AddOrLinkRequestResolver()
        //------------------------------------//
        {
            if( requestResolver != null ) { return; }

            if( GetComponent<RequestResolver>() != null )
            {
                requestResolver = GetComponent<RequestResolver>();
            }
            else
            {
                requestResolver = gameObject.AddComponent<RequestResolver>();
            }

        } //AddOrLinkRequestResolver();
コード例 #10
0
ファイル: WildCard.cs プロジェクト: DataExperts/Dexih.Dns
        public void Test_Dynamic_A_Request()
        {
            var requestResolver = new RequestResolver(null, null, RootAddress, new [] { "20.20.20.20" }, "dexih.com", "*****@*****.**", 123, 60, "abc");

            var question = new Question(new Domain("127-0-0-1.abc.dexih.com"), RecordType.A, RecordClass.IN);

            var request = new Request(new Header(), new List <Question>()
            {
                question
            }, new List <IResourceRecord>());
            var resolve = requestResolver.Resolve(request).Result;

            Assert.Equal(1, resolve.AnswerRecords.Count);

            Assert.IsType <IPAddressResourceRecord>(resolve.AnswerRecords[0]);

            var record = (IPAddressResourceRecord)resolve.AnswerRecords[0];

            Assert.Equal("127.0.0.1", record.IPAddress.ToString());
        }
コード例 #11
0
    public void OnEnable()
    {
        videoId = ControlVideos.YoutubeVideoCode; // makes the video play based on the video code in the button

        resolver = gameObject.AddComponent <RequestResolver>();
        if (Application.isMobilePlatform)
        {
            if (GetMaxQualitySupportedByDevice() <= 720)
            {
                //low end device..
                if (videoQuality != VideoQuality.mediumQuality)
                {
                    videoQuality = VideoQuality.Hd720;
                }
                noHD = true;
            }
        }

        if (playOnStart)
        {
            PlayYoutubeVideo(videoId);
        }
    }
コード例 #12
0
 public RenameService(FileRenamer renamer, RequestResolver resolver, FileInfoService fileInfoService)
 {
     this.renamer         = renamer;
     this.resolver        = resolver;
     this.fileInfoService = fileInfoService;
 }
コード例 #13
0
 private void Start()
 {
     instance = this;
     resolver = gameObject.AddComponent <RequestResolver>();
 }
コード例 #14
0
 public void RegisterResolver(RequestResolver resolver)
 {
     this.resolver = resolver;
 }
コード例 #15
0
 public void Start()
 {
     resolver = gameObject.AddComponent <RequestResolver>();
     GetURL(videoId);
 }
コード例 #16
0
 public void Start()
 {
     isPrepared            = false;
     youtubePlayer.enabled = false;
     resolver = gameObject.AddComponent <RequestResolver>();
 }
コード例 #17
0
ファイル: YoutubeDownloader.cs プロジェクト: K514/RhythmGame
 private void Awake()
 {
     _reqResolver = GetComponent <RequestResolver>();
 }