Пример #1
0
 private static MediaEventArgs CreateMediaEventArgs(Guid id, MediaChange change)
 {
     return(new()
     {
         MediaItemId = id,
         Classification = MediaClassification.Web,
         Change = change,
     });
 }
Пример #2
0
 private MediaEventArgs CreateMediaEventArgs(Guid id, MediaChange change)
 {
     return(new MediaEventArgs
     {
         MediaItemId = id,
         Classification = MediaClassification.Audio,
         Change = change
     });
 }
Пример #3
0
        private async Task CreateMediaChangeOnTagsUpdate(string mediaInstanceId, string userId)
        {
            var newMediaChange = new MediaChange
            {
                MediaInstanceId = mediaInstanceId,
                UserId          = userId,
                Timestamp       = _timeProvider.GetUtc(),
                Type            = MediaChangeType.Update
            };

            await _context.MediaChanges.AddAsync(newMediaChange);
        }
Пример #4
0
        public async void ChangeMedia(string videoId)
        {
            MediaChange data = new MediaChange();

            data.videoId   = videoId;
            data.room      = roomId;
            data.token     = token;
            data.isPrivate = isPrivate;

            string sendingData = JsonConvert.SerializeObject(data);

            await SendData(sendingData);
        }
Пример #5
0
        private async Task CreateMediaChangeOnMediaInstanceCreation(string mediaInstanceId, string userId)
        {
            var newMediaChange = new MediaChange
            {
                MediaInstanceId = mediaInstanceId,
                UserId          = userId,
                Timestamp       = _timeProvider.GetUtc(),
                Type            = MediaChangeType.Create
            };

            await _context.MediaChanges.AddAsync(newMediaChange);

            await _context.SaveChangesAsync(CancellationToken.None);
        }
Пример #6
0
        private MediaEventArgs CreateMediaEventArgs(Guid id, MediaClassification mediaClassification, MediaChange change)
        {
            if (id == Guid.Empty)
            {
                return(null);
            }

            return(new MediaEventArgs
            {
                MediaItemId = id,
                Classification = mediaClassification,
                Change = change
            });
        }