private void StepPage_Instance_Appearing(object sender, EventArgs e) { base.OnAppearing(); // Video Player videoPlayerRow.Height = this.Width * 0.57; ResourceVideoSource source = new ResourceVideoSource(); switch (Device.RuntimePlatform) { case Device.iOS: // source.Path = "Videos/eye_surgery.mp4"; source.Path = "Videos/Brain_Eyes_Vid.mp4"; break; case Device.Android: // source.Path = "eye_surgery.mp4"; source.Path = "Brain_Eyes_Vid.mp4"; break; case Device.UWP: // source.Path = "Videos/eye_surgery.mp4"; source.Path = "Videos/Brain_Eyes_Vid.mp4"; break; } videoPlayer.Source = source; contentRow.Children.Add(new StepsView()); }
private void ApplyNewTourItem(TourItem item) { Title = item.Title; Text = item.Text; Gif = item.Gif; VideoSource = new ResourceVideoSource() { Path = item.Video }; }
protected override void OnAppearing() { base.OnAppearing(); ResourceVideoSource source = new ResourceVideoSource(); UriVideoSource uriSource = new UriVideoSource(); uriSource.Uri = procedureViewModel.Procedure.VideoSource; videoPlayer.Source = uriSource; videoPlayer.Play(); videoPlayer.Position = procedureViewModel.VideoPosition; }
protected override void OnAppearing() { base.OnAppearing(); ResourceVideoSource source = new ResourceVideoSource(); UriVideoSource uriSource = new UriVideoSource(); uriSource.Uri = procedureViewModel.Procedure.VideoSource; videoPlayer.Source = uriSource; videoPlayer.Play(); videoPlayer.Position = procedureViewModel.VideoPosition; playPauseButton.Source = ImageSource.FromResource("ESA.Resources.VideoPlayer.pause.png", typeof(ImageResourceExtension).GetTypeInfo().Assembly); }
public VideoPage(DetailsViewModel dvm) { NavigationPage.SetHasNavigationBar(this, false); InitializeComponent(); procedureViewModel = dvm; string videoName = procedureViewModel.VideoName; ResourceVideoSource source = new ResourceVideoSource(); UriVideoSource uriSource = new UriVideoSource(); uriSource.Uri = procedureViewModel.Procedure.VideoSource; //switch (Device.RuntimePlatform) //{ // case Device.iOS: // // source.Path = "Videos/eye_surgery.mp4"; // source.Path = "Videos/" + videoName; // break; // case Device.Android: // // source.Path = "eye_surgery.mp4"; // source.Path = videoName; // break; // case Device.UWP: // // source.Path = "Videos/eye_surgery.mp4"; // source.Path = "Videos/" + videoName; // break; //} player.Source = uriSource; // Fade Timer fadeTimer.Interval = 3000; fadeTimer.Elapsed += (s, e) => { Device.BeginInvokeOnMainThread(() => { VideoControls_Tapped(s, e); }); }; fadeTimer.Enabled = true; fadeTimer.Start(); }