protected override void OnNavigatedTo(NavigationEventArgs e) { _playFactory = PlayAdapter.CreatePlayFactory(NavigationContext); _playFactory.PlayMessageAction += SetPlayMessage; Play(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { Window.Current.CoreWindow.PointerMoved += CoreWindow_PointerMoved; rootGrid.PointerPressed += CoreWindows_PointerPressed; _playToManager.SourceRequested += playToManager_SourceRequested; _playToManager.SourceSelected += playToManager_SourceSelected; _playFactory = PlayAdapter.CreatePlayFactory(e.Parameter); _playFactory.PlayMessageAction += SetPlayMessage; _playFactory.PlayErrorAction += SetPlayError; _playFactory.HttpFailOrTimeoutAction += HttpFailOrTimeout; _playFactory.DacPlayInfo.programSource = (int)DACPageType; Play(); DisplayActive(); }
public static IPlayFactory CreatePlayFactory(object parameter) { IPlayFactory playFactory = null; if (parameter is LiveListItem) { playFactory = new PlayLiveFactory(parameter); } else if (parameter is DownloadInfo) { playFactory = new PlayDownloadFactory(parameter); } else { playFactory = new PlayVodFactory(parameter); } return(playFactory); }