Ejemplo n.º 1
0
        public AudioPlayerViewModel(ChurchMedia audio, string str)
        {
            Item = new ChurchMedia();
            Item = audio;
            //Item = new DownloadedAudio(audio);
            AddToQueue();
            checkmediaqueu();
            CrossMediaManager.Current.PositionChanged += Current_PositionChanged;
            CrossMediaManager.Current.StateChanged    += Current_StateChanged;
            Duration  = 1000;
            _instance = this;
            MessagingCenter.Subscribe <MediaViewModel, ChurchMedia>(this, "Stream", (sender, args) =>
            {
                IsBusy           = true;
                App.TobeStreamed = args;
                var medi         = new MediaItem(args.filePath)
                {
                    Title  = args.name,
                    Artist = args.name
                };
                StreamAudiofile(medi);
            });

            MessagingCenter.Subscribe <AudioList, ChurchMedia>(this, "Stream", (sender, args) =>
            {
                IsBusy           = true;
                App.TobeStreamed = args;
                var medi         = new MediaItem(args.filePath)
                {
                    Title  = args.name,
                    Artist = args.name,
                };
                StreamAudiofile(medi);
            });
        }
Ejemplo n.º 2
0
 public PlayVideoPage(ChurchMedia media)
 {
     InitializeComponent();
     model = media;
     Init(media);
     // CrossMediaManager.Current.Play(media.imagePath);
 }
Ejemplo n.º 3
0
 private void Init(ChurchMedia media)
 {
     videoPath.Text   = media.filePath;
     title.Text       = media.name;
     author.Text      = media.category;
     videoImg.Source  = media.imagePath;
     description.Text = media.description;
     date.Text        = media.dateAdded.ToString("dddd, dd MMMM yyyy");
 }
Ejemplo n.º 4
0
 public DownloadedMedia(ChurchMedia model)
 {
     imagePath   = model.imagePath;
     name        = model.name;
     description = model.description;
     mediaType   = model.mediaType;
     category    = model.category;
     dateAdded   = model.dateAdded;
     price       = model.price;
     filePath    = model.filePath;
 }
Ejemplo n.º 5
0
        public VLCPage(ChurchMedia path)
        {
            InitializeComponent();
            medias = path;
            LibVLCSharp.Shared.Core.Initialize();
            lib = new LibVLC();

            var media = new LibVLCSharp.Shared.Media(lib, path.filePath, FromType.FromLocation);

            mymedia.MediaPlayer = new MediaPlayer(media)
            {
                EnableHardwareDecoding = true
            };
            mymedia.MediaPlayer.Play();

            desc.Text = path.description;
        }
Ejemplo n.º 6
0
 public Picturepopup(ChurchMedia media)
 {
     InitializeComponent();
     image.Source = media.filePath;
 }
Ejemplo n.º 7
0
 public BookDetailsPage(ChurchMedia m)
 {
     InitializeComponent();
     media          = m;
     BindingContext = media;
 }
Ejemplo n.º 8
0
 public MediaDetailPage(ChurchMedia model)
 {
     InitializeComponent();
     this.BindingContext = new MediaDetailVM(model);
     media = model;
 }
Ejemplo n.º 9
0
        //private DownloadedAudio item;

        //public AudioPlayerViewModel Vm => BindingContext as AudioPlayerViewModel;

        public PlayAudioPage(ChurchMedia media, string v)
        {
            InitializeComponent();
            BindingContext = new AudioPlayerViewModel(media, v);
        }
Ejemplo n.º 10
0
 public MediaDetailVM(ChurchMedia model)
 {
     this.ChurchMedia = model;
 }