private static void PlayPath(string path) { try { if (!AddInHost.Current.MediaCenterEnvironment.PlayMedia(Microsoft.MediaCenter.MediaType.Video, path, false)) { Logger.ReportInfo("PlayMedia returned false"); } } catch (Exception ex) { Logger.ReportException("Playing media failed.", ex); Application.ReportBrokenEnvironment(); return; } }
public void PlayPath(string path, Microsoft.MediaCenter.MediaType asType, bool addToQueue) { try { if (!AddInHost.Current.MediaCenterEnvironment.PlayMedia(asType, path, addToQueue)) { Logger.ReportInfo("PlayMedia returned false"); } } catch (Exception ex) { Logger.ReportException("Playing media failed.", ex); Application.ReportBrokenEnvironment(); return; } }