Exemplo n.º 1
0
        private void Button_Clicked(object sender, EventArgs e)
        {
            flag = !flag;

            string pausefunctionString = @"var videos = document.querySelectorAll('video');  
                        [].forEach.call(videos, function(video) { video.pause(); });
                        ";
            string playfunctionString  = @"var videos = document.querySelectorAll('video');  
                        [].forEach.call(videos, function(video) { video.play(); });
                        ";

            if (flag)
            {
                MyWebView.Eval(pausefunctionString);
            }
            else
            {
                MyWebView.Eval(playfunctionString);
            }
        }