Exemplo n.º 1
0
        public void removeAudio()
        {
            HtmlVideoElement tag = videoElement;

            // Get the audio source:
            AudioSource source = tag.Audio;

            if (source == null)
            {
                return;
            }

            GameObject.Destroy(source);
            tag.Audio = null;
        }
Exemplo n.º 2
0
        public override void GoingOnDisplay(Css.RenderableData context)
        {
            // Note that this is only called if Video is set.
            HtmlVideoElement videoElement = context.Node as HtmlVideoElement;

            if (videoElement == null)
            {
                return;
            }

            if (!Video.isPlaying && videoElement["autoplay"] != null)
            {
                // Play now:
                videoElement.play();

                // Clear - don't autoplay again:
                videoElement["autoplay"] = null;
            }
        }