public async void PlayNext(LinkItem current) { if (_list.Count <= 0) { return; } LinkItem next; if (!_list.Contains(current)) { next = _list[0]; } else { var index = _list.IndexOf(current); next = _list[0]; if (_list.IndexOf(current) != _list.Count - 1) { next = _list[index + 1]; } } await _player.PlayVideoAsync(next); }
public void RemoveItem(LinkItem item) { _list.Remove(item); Destroy(item); }