コード例 #1
0
        public bool OpenVideoURL()
        {
            MediaPlayerWindow win = Container.AddClip();

            win.Flipped = true; //flip for user to fill-in Media URL field
            return(true);
        }
コード例 #2
0
        public MediaPlayerWindow AddClip()
        {
            MediaPlayerWindow w = (MediaPlayerWindow)AddWindow(MediaPlayerWindowFactory, newInstance: true);

            w.MediaPlayerView.Source = new Uri(ActivityWindow.URL_DEFAULT_VIDEO, UriKind.Absolute);
            return(w);
        }
コード例 #3
0
        private void BindMediaPlayerWindow(MediaPlayerWindow window)
        {
            if (window.View != null && View != null)
            {
                try
                {
                    //bind Time
                    BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                                View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)

                    //bind Captions (note: must do 2nd else freezes, not sure why - would expect the reverse order to be needed)
                    BindingUtils.BindProperties(View, IActivityProperties.PropertyCaptions,            //Note: Since Clip component doesn't save/load captions itself, it should use as source the Activity, not the other way around, else order of component loading (e.g. 1st load Captions component in Activity and then Clip component) causes loss of captions in the Captions component (gets null value from Clip component via the Container two-way binding)
                                                window.View, IMediaPlayerProperties.PropertyCaptions); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
                }
                catch (Exception ex)
                {
                    ErrorDialog.Show("Failed to bind Clip component", ex);
                }
            }
        } //TODO: check why it won't sync smoothly (see what was doing in LvS, maybe ignore time events that are very close to current time) //most probably need to ignore small time differences at sync
コード例 #4
0
        //OpenVideo//

        public bool OpenVideoFile()
        {
            MediaPlayerWindow win = Container.AddClip();

            return(win.OpenLocalFile());
        }