Exemplo n.º 1
0
        //private void ContentListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        //{
        //    CurrentMediaContent = (mediaFile.MediaContentDetail)e.SelectedItem;
        //    if (!CurrentMediaContent.IsHeader)
        //        PopupActionCommand();
        //}

        public async void UpdateCurrentMedia()
        {
            var queue = CrossMediaManager.Current.MediaQueue;

            queue.Clear();
            List <MediaFile>   mediaFiles = new List <MediaFile>();
            IMediaFileMetadata metaData   = new MediaFileMetadata();

            metaData = new MediaFileMetadata();
            metaData.DisplayTitle       = CurrentMediaContent.MediaTitle;
            metaData.DisplayDescription = CurrentMediaContent.SetsAndRepeats;
            string source = helper.GetFilePath(CurrentMediaContent.MediaUrl, FileType.Video);

            //string source = "https://sandbox.oghq.ca/appcontent/welcome_video.mp4";
            // "https://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4";
            mediaFiles.Add(new MediaFile()
            {
                Url  = source,
                Type = MediaFileType.Video,
                MetadataExtracted = false,
                Availability      = ResourceAvailability.Remote,
                Metadata          = metaData
            });
            CrossMediaManager.Current.MediaQueue.Repeat = RepeatType.RepeatAll;
            await CrossMediaManager.Current.Play(mediaFiles);
        }
Exemplo n.º 2
0
        public void GetsCorrectMetadataTest()
        {
            MediaFile         MediaFile = MediaFile.CreateNew(VboxTestUrl);
            MediaFileMetadata metadata  = MediaFile.Metadata;

            bool isVboxMetadata = metadata is VboxFileMetadata;

            Assert.AreEqual(true, isVboxMetadata);
        }