Пример #1
0
        public MainPage()
        {
            InitializeComponent();
            players = new ComposerControlHelper();

            jwSkinPackage = new JwSkinPackage();
            jwSkinPackage.SkinReady += JwSkinPackageSkinPackageReady;

            Player.MouseLeftButtonUp += Player_MouseLeftButtonUp;
            Player.Cursor = Cursors.Hand;

            bridge = new HtmlInteraction(this);
            bridge.AddBinding(Player);

            if (!String.IsNullOrEmpty(srcPlaylist)) {
                Player.LoadPlaylist(srcPlaylist);
            }

            AddBinding(Player);
            ControlBarView.AddBinding(Player);
            DisplayView.AddBinding(Player);
            DockView.AddBinding(Player);
            PlaylistView.AddBinding(Player);
            CaptionView.AddBinding(Player);

            DockView.CaptionVisibilityChanged += DockView_CaptionVisibilityChanged;

            controlBarFader = new OpacityFader(ControlBarView);
            dockFader = new OpacityFader(DockView);
            SetFadeTimer();
            CaptionView.Margin = new Thickness(0, 0, 0, 75);// we don't know the height until images are all loaded... take a guess for now!
        }
Пример #2
0
 public JW5_Dock()
 {
     InitializeComponent();
     customButtons = new Dictionary<string, ImageHoverButton>();
     players = new ComposerControlHelper();
     CaptionsButton.Clicked += CaptionsButtonClicked;
 }
Пример #3
0
        public HtmlInteraction(MainPage jwPlayer)
        {
            this.jwPlayer = jwPlayer;
            players = new ComposerControlHelper();
            javascriptEvents = new EventRegistry();

            // Register normal Silverlight bridge object
            HtmlPage.RegisterScriptableObject(ScriptRegistration, this);

            // bind scriptable object events back to html element (like Flash does):
            BackBind("jwAddEventListener", 2);//
            BackBind("jwRemoveEventListener", 2);//

            BackBind("jwGetBuffer", 0);//
            BackBind("jwGetDuration", 0);//
            BackBind("jwGetFullscreen", 0);//
            BackBind("jwGetHeight", 0);//
            BackBind("jwGetMute", 0);//
            BackBind("jwGetPlaylist", 0);//
            BackBind("jwGetPlaylistIndex", 0);//
            BackBind("jwGetPosition", 0);//
            BackBind("jwGetState", 0);//
            BackBind("jwGetWidth", 0);//
            BackBind("jwGetVersion", 0);
            BackBind("jwGetVolume", 0);//

            BackBind("jwPlay", 1);//
            BackBind("jwPause", 1);//
            BackBind("jwStop", 0);//
            BackBind("jwSeek", 1);//
            BackBind("jwLoad", 1);//
            BackBind("jwPlaylistItem", 1);//
            BackBind("jwPlaylistNext", 0);//
            BackBind("jwPlaylistPrev", 0);//
            BackBind("jwSetMute", 1);//
            BackBind("jwSetVolume", 1);//
            BackBind("jwSetFullscreen", 1);//

            BackBind("jwControlbarShow", 0);//
            BackBind("jwControlbarHide", 0);//
            BackBind("jwDisplayShow", 0);//
            BackBind("jwDisplayHide", 0);//
            BackBind("jwDockHide", 0);//
            BackBind("jwDockSetButton", 4);//
            BackBind("jwDockShow", 0);//

            BackBind("getPluginConfig", 0);//

            Application.Current.Host.Content.FullScreenChanged += Content_FullScreenChanged;
            Application.Current.Host.Content.Resized += Content_Resized;

            // trigger player ready event
            HtmlPage.Window.Eval("if(jwplayer && jwplayer()) {jwplayer().playerReady(document.getElementById('" + HtmlPage.Plugin.Id + "'));}");
        }
Пример #4
0
 public JW5_Playlist()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
     ScrollSlider.TargetProportionChanged += ScrollSlider_TargetProportionChanged;
 }
Пример #5
0
 public JwDurationText()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
 }
Пример #6
0
 public JW5_ControlBar()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
     BindFullScreenEvents();
 }
Пример #7
0
 public JW5_CaptionText()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
     LayoutRoot.SizeChanged += LayoutRoot_SizeChanged;
 }
Пример #8
0
 public JW5_Display()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
 }
Пример #9
0
 public JwElapsedText()
 {
     InitializeComponent();
     players = new ComposerControlHelper();
 }