Exemple #1
0
 /// <summary>
 /// Set whether the video in HTML page should be auto played or not.
 /// </summary>
 /// <param name="allowed">If true, UniWebView will try to play media in the video tag automatically.</param>
 /// <description>
 /// By default, the video playback requires user interaction. By calling this method with true AND setting the
 /// video tag witn "autoplay" property, the video will be auto played once it gets loaded.
 /// This method will not work in Editor version.
 /// See https://www.w3schools.com/tags/att_video_autoplay.asp for auto play video tag.
 /// </description>
 public void SetAllowAutoPlay(bool allowed)
 {
     #if !UNITY_EDITOR && !UNITY_WP8
     UniWebViewPlugin.SetAllowAutoPlay(gameObject.name, allowed);
     #endif
 }