public bool Play(string filename)
    {
        this.filepath = filename;

        Debug.Log("PLAY VideoPlayerInterface: " + this.filepath);
        if (VideoPlayerInterface.CanOutputToTexture(filename) == true)
        {
            Debug.Log("PlayVideo");
            return(VideoPlayer_Play());
        }

        return(false);
    }
    public bool Play(string filename, bool loop)
    {
        this.filepath = filename;

        Debug.Log("PLAY LOOP VideoPlayerInterface: " + this.filepath);
        if (VideoPlayerInterface.CanOutputToTexture(filename) == true)
        {
            Debug.Log("PlayVideo with loop");
            VideoPlayer_SetLoop(loop);
            return(VideoPlayer_Play());
        }

        return(false);
    }
Exemplo n.º 3
0
        protected override void OnPlay(ResourceBase resource, Texture movie, bool loop)
        {
            var path     = resource.GetStreamPath();
            var instance = this.FindInstance(resource);

            if (instance == null)
            {
                Debug.Log("CREATE NEW VideoPlayerInterface");
                var video = new VideoPlayerInterface(this.system);
                if (video.Play(path, loop) == true)
                {
                    this.playingInstances.Add(path, video);
                }
            }
        }
Exemplo n.º 4
0
        protected override IEnumerator LoadTexture_YIELD(ResourceAsyncOperation asyncOperation, IImageComponent component, ResourceBase resource)
        {
            var filePath = resource.GetStreamPath();

            var instance = this.FindInstance(resource);

            if (instance != null)
            {
                instance.Load(asyncOperation, filePath);
            }
            else
            {
                var item = new VideoPlayerInterface(this.system);
                this.playingInstances.Add(filePath, item);
                item.Load(asyncOperation, filePath);
            }

            yield return(false);
        }
Exemplo n.º 5
0
		protected override void OnPlay(ResourceBase resource, Texture movie, bool loop) {
			
			var path = resource.GetStreamPath();
			var instance = this.FindInstance(resource);
			if (instance == null) {

				Debug.Log("CREATE NEW VideoPlayerInterface");
				var video = new VideoPlayerInterface(this.system);
				if (video.Play(path, loop) == true) {
					
					this.playingInstances.Add(path, video);
					
				}
				
			}

		}
Exemplo n.º 6
0
		protected override IEnumerator LoadTexture_YIELD(ResourceAsyncOperation asyncOperation, IImageComponent component, ResourceBase resource) {
			
			var filePath = resource.GetStreamPath();
			
			var instance = this.FindInstance(resource);
			if (instance != null) {

				instance.Load(asyncOperation, filePath);

			} else {

				var item = new VideoPlayerInterface(this.system);
				this.playingInstances.Add(filePath, item);
				item.Load(asyncOperation, filePath);

			}

			yield return false;

		}