private void OnGUI() { if (GUI.Button(new Rect(0, 0, 500, 100), "Playe Video By URL")) { var url = ISN_NSURL.URLWithString("https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"); var player = new ISN_AVPlayer(url); var viewController = new ISN_AVPlayerViewController(); viewController.Player = player; //Optional setting that you can apply player.Volume = 0.8f; viewController.ShowsPlaybackControls = true; viewController.AllowsPictureInPicturePlayback = false; viewController.ShouldCloseWhenFinished = false; viewController.Show(); } if (GUI.Button(new Rect(300, 0, 500, 100), "Playe Video By URL no close")) { var url = ISN_NSURL.URLWithString("https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"); var player = new ISN_AVPlayer(url); var viewController = new ISN_AVPlayerViewController(); viewController.Player = player; //Optional setting that you can apply player.Volume = 0.8f; viewController.Show(); } if (GUI.Button(new Rect(700, 0, 500, 100), "Playe LOCAL")) { var url = ISN_NSURL.StreamingAssetsURLWithPath("big_buck_bunny.mp4"); var player = new ISN_AVPlayer(url); player.Volume = 0; var viewController = new ISN_AVPlayerViewController(); viewController.Player = player; viewController.Show(); } }
public void startMyVideo() { var url = ISN_NSURL.StreamingAssetsURLWithPath("VenusVideo.mp4"); var player = new ISN_AVPlayer(url); player.Volume = 0.8f; var viewController = new ISN_AVPlayerViewController(); viewController.Player = player; viewController.ShowsPlaybackControls = true; viewController.AllowsPictureInPicturePlayback = false; viewController.ShoudCloseWhenFinished = false; viewController.Show(); }