public async Task GetMediaAsync() { IMediaProvider mediaFactory = ClientCore.Factory.MediaFactory.Singleton.CreateMediaProvider(); Media Media = (Media)await mediaFactory.GetMediaAsync(); AudioMediaDevicesCapturersList = await Media.GetMediaDevicesAsync(MediaKind.AudioInputDevice); AudioMediaDevicesRendersList = await Media.GetMediaDevicesAsync(MediaKind.AudioOutputDevice); VideoMediaDevicesList = await Media.GetMediaDevicesAsync(MediaKind.VideoDevice); AudioCodecsList = await Media.GetCodecsAsync(MediaKind.AudioCodec); VideoCodecsList = await Media.GetCodecsAsync(MediaKind.VideoCodec); }
async Task <object> MapLinkedMediaAsync(object source) { Guid id; if (Guid.TryParse((string)source, out id)) { try { return(await _mediaProvider.GetMediaAsync(id)); } catch { _log.LogDebug($"Failed to map linked media {id}"); return(null); } } return(null); }
public async Task <MediaItem> GetMediaItemAsync(Guid id) => await _mediaProvider.GetMediaAsync(id);