Пример #1
0
        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);
        }
Пример #2
0
 public void RemoveItem(LinkItem item)
 {
     _list.Remove(item);
     Destroy(item);
 }