public CffOfflinePage() { this.InitializeComponent(); adaptivePlugin = new AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); adaptivePlugin.InstreamCaptionsEnabled = true; var ttmlPlugin = new CaptionsPlugin(); player.Plugins.Add(ttmlPlugin); OpenFile(); }
/// <summary>Initializes the Smooth Streaming plugin.</summary> private void InitializePlugins() { var adaptivePlugin = new AdaptivePlugin() { InstreamCaptionsEnabled = true }; Player.Plugins.Add(adaptivePlugin); var captionPlugin = new CaptionsPlugin(); Player.Plugins.Add(captionPlugin); }
/// <summary> /// Preserves state associated with this page in case the application is suspended or the /// page is discarded from the navigation cache. Values must conform to the serialization /// requirements of <see cref="SuspensionManager.SessionState"/>. /// </summary> /// <param name="pageState">An empty dictionary to be populated with serializable state.</param> protected override void SaveState(Dictionary <String, Object> pageState) { Clear(); dashDownloaderPlugin.ChunkRequested -= dashDownloaderPlugin_ChunkRequested; dashDownloaderPlugin.ManifestRequested -= dashDownloaderPlugin_ManifestRequested; adaptivePlugin.Manager.OpenedBackground -= manager_Opened; adaptivePlugin.Manager.ClosedBackground -= manager_Closed; player.IsFullScreenChanged -= player_IsFullScreenChanged; player.Dispose(); adaptivePlugin = null; dashDownloaderPlugin = null; }
/// <summary> /// Preserves state associated with this page in case the application is suspended or the /// page is discarded from the navigation cache. Values must conform to the serialization /// requirements of <see cref="SuspensionManager.SessionState"/>. /// </summary> /// <param name="navigationParameter">The parameter value passed to /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested. /// </param> /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param> /// <param name="e">Event data that provides an empty dictionary to be populated with /// serializable state.</param> private void navigationHelper_SaveState(object sender, SaveStateEventArgs e) { Clear(); dashDownloaderPlugin.ChunkRequested -= dashDownloaderPlugin_ChunkRequested; dashDownloaderPlugin.ManifestRequested -= dashDownloaderPlugin_ManifestRequested; adaptivePlugin.Manager.OpenedBackground -= manager_Opened; adaptivePlugin.Manager.ClosedBackground -= manager_Closed; player.IsFullScreenChanged -= player_IsFullScreenChanged; player.Dispose(); adaptivePlugin = null; dashDownloaderPlugin = null; }
public CffOfflinePage() { this.InitializeComponent(); this.navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += this.NavigationHelper_LoadState; this.navigationHelper.SaveState += this.NavigationHelper_SaveState; adaptivePlugin = new AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); adaptivePlugin.InstreamCaptionsEnabled = true; var ttmlPlugin = new CaptionsPlugin(); player.Plugins.Add(ttmlPlugin); OpenFile(); }
public MainPage() { InitializeComponent(); // add adaptive plugin in order to play smooth streaming adaptivePlugin = new Microsoft.PlayerFramework.Adaptive.AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); player.VisualMarkers.Add(new VisualMarker() { Time = TimeSpan.FromSeconds(10) }); player.VisualMarkers.Add(new VisualMarker() { Time = TimeSpan.FromSeconds(20) }); PhoneApplicationService.Current.Deactivated += Current_Deactivated; PhoneApplicationService.Current.Activated += Current_Activated; }
public SplitPage() { this.InitializeComponent(); InitPlayReady(); adaptivePlugin = new AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); dashDownloaderPlugin = new DashDownloaderPlugin(); adaptivePlugin.DownloaderPlugin = dashDownloaderPlugin; dashDownloaderPlugin.ChunkRequested += dashDownloaderPlugin_ChunkRequested; dashDownloaderPlugin.ManifestRequested += dashDownloaderPlugin_ManifestRequested; adaptivePlugin.Manager.OpenedBackground += manager_Opened; adaptivePlugin.Manager.ClosedBackground += manager_Closed; player.IsFullScreenChanged += player_IsFullScreenChanged; Requests.ItemsSource = RequestCollection; }
public SplitPage() { this.InitializeComponent(); // Setup the navigation helper this.navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += navigationHelper_LoadState; this.navigationHelper.SaveState += navigationHelper_SaveState; adaptivePlugin = new AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); dashDownloaderPlugin = new DashDownloaderPlugin(); adaptivePlugin.DownloaderPlugin = dashDownloaderPlugin; dashDownloaderPlugin.ChunkRequested += dashDownloaderPlugin_ChunkRequested; dashDownloaderPlugin.ManifestRequested += dashDownloaderPlugin_ManifestRequested; adaptivePlugin.Manager.OpenedBackground += manager_Opened; adaptivePlugin.Manager.ClosedBackground += manager_Closed; player.IsFullScreenChanged += player_IsFullScreenChanged; Requests.ItemsSource = RequestCollection; }
/// <summary>Initializes the Smooth Streaming plugin.</summary> private void InitializePlugins() { var adaptivePlugin = new AdaptivePlugin(); Player.Plugins.Add(adaptivePlugin); }