Example #1
0
        public override void Up()
        {
            var videos        = new VideoDataProvider().Create();
            var context       = new ApplicationDbContext();
            var videosPhrases = new VideoPhraseProvider().Create(videos);

            context.VideoPhrases.AddRange(videosPhrases);
            context.SaveChanges();
        }
Example #2
0
        public Live()
        {
            this.InitializeComponent();
            player.MediaOpened         += Player_MediaOpened;
            player.MediaFailed         += Player_MediaFailed;
            player.CurrentStateChanged += Player_CurrentStateChanged;

            // Get an Azure hosted video
            VideoDataProvider dataProvider = new VideoDataProvider();

            video = dataProvider.GetRandomVideo();

            //Set the source on the player
            player.Source = video.VideoLink;

            //Subscribe for the clicked event on the custom cast button
            ((MediaTransportControlsWithCustomCastButton)this.player.TransportControls).CastButtonClicked += TransportControls_CastButtonClicked;

            // Instantiate the Device Picker
            picker = new CastingDevicePicker();

            // Generate the filter based on the content in the MediaElement
            picker.Filter.SupportedCastingSources.Add(player.GetAsCastingSource());

            //Hook up device selected event
            picker.CastingDeviceSelected += Picker_CastingDeviceSelected;

            //Hook up device disconnected event
            picker.CastingDevicePickerDismissed += Picker_CastingDevicePickerDismissed;

            //Set the Appearence of the picker
            picker.Appearance.BackgroundColor = Colors.Black;
            picker.Appearance.ForegroundColor = Colors.White;
            picker.Appearance.AccentColor     = Colors.Gray;

            picker.Appearance.SelectedAccentColor = Colors.Gray;

            picker.Appearance.SelectedForegroundColor = Colors.White;
            picker.Appearance.SelectedBackgroundColor = Colors.Black;
        }