1. #71
    Sencha Premium Member lorezyra's Avatar
    Join Date
    Dec 2007
    Location
    Japan -- 日本
    Posts
    635
    Vote Rating
    15
    lorezyra will become famous soon enough lorezyra will become famous soon enough

      0  

    Question Remove the "Eject" button

    Remove the "Eject" button


    Without modifying the Ext.apply function of Ext.ux.YoutubePlayer.Control(),
    Is there a way to simply not render the ejectbutton?

    Code:
            Ext.apply(this, {
                cls   : 'ext-ux-youtubeplayer-control',
                items : [
                    this.ejectButton,
                    this.playButton,
                    this.stopButton,
                    this.previousButton,
                    this.nextButton,
                    ' ',
                    this.sliderField,
                    ' ',
                    this.elRuntime,
                    new Ext.Toolbar.Spacer(),
                    this.muteButton
                ]
            });
    I'm thinking something along the lines where I pass a config for the buttons I want...
    Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...

    When in doubt, check the d4mn source code!
    ================================================
    And here are my terms...
    1. I don't care if you use my source code. (Known as "Code.")
    2. I don't care if I get any monetary compensation.
    3. I do care to receive credit for Code provided. So, please keep my name in the comments for Code provided.
    4. Code is provided without warranty "AS-IS" and I claim absolutely no warranty nor liability to the quality, security, and run-ability on any platform.
    5. By using Code, you accept all risk inherit with Code regardless if Code has known and yet to be discovered bugs.
    6. You are welcome to change and improve the Code to best meet your needs.
    7. I don't care if you use the Code in a commercial or open-source project.
    8. You are not required to contact me prior to using the Code.
    ================================================
    Simple. Enjoy.

  2. #72
    Sencha User
    Join Date
    Oct 2009
    Posts
    44
    Vote Rating
    0
    coolstar is on a distinguished road

      0  

    Default Example with Desktop?

    Example with Desktop?


    Can you give us an example of using the player in the desktop? I can't seem to get this to work. I have put in the code.

    Code:
                new MyDesktop.YoutubeWindow(),
    Code:
    MyDesktop.YoutubeWindow = Ext.extend(Ext.app.Module, {
        id:'yt-win',
        init : function(){
            this.launcher = {
                text: 'Youtube Player',
                iconCls:'tabs',
                handler : this.createWindow,
                scope: this
            }
        },
    
        createWindow : function(){
                    var playerPanel = new Ext.ux.YoutubePlayer({
       		developerKey : DEVELOPER_KEY,	
       		playerId	 : 'myplayer',
       		border		 : false,
       		ratioMode    : 'strict',
       		hideMode     : 'visibility',
       		bgColor 	 : "#000000",
       		bodyStyle 	 : 'background-color:#000000;'
       	});
       
       	playerPanel.on('ready', function(panel, player) {
       		panel.cueVideoById('u1zgFlCw8Aw', 0);
       	}, playerPanel);
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('yt-win');
            if(!win){
                win = desktop.createWindow({
                    id: 'yt-win',
                    title:'Youtube Player',
                    width:740,
                    height:480,
                    iconCls: 'tabs',
                    shim:false,
                    animCollapse:false,
                    border:false,
                    constrainHeader:true,
                    layout: 'fit',
                    items: [playerPanel],
                    bbar	 : new Ext.ux.YoutubePlayer.Control({
            	player   : playerPanel,
            	border	 : false,
            	id 		 : 'control', 
            	style	 : 'border:none;'
                    }),
                    listeners   : {
            	'resize': function(){this.bottomToolbar.fireEvent('resize')}
        	        }
                });
            }
            win.show();
        }
    });
    Here is the error reported by firebug:
    Ext.Menu.Adapter is not a constructor

  3. #73
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by coolstar View Post
    Ext.Menu.Adapter is not a constructor
    i guess you are using Ext 3.x ? The Menu Component has been changed in Ext 3.x so the extension might need some code adjustments.

  4. #74
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    I have updated the component at r17 to work with Ext 3.0.3 (http://code.google.com/p/ext-ux-yout.../browse/trunk/)

  5. #75
    Sencha User
    Join Date
    Oct 2009
    Posts
    44
    Vote Rating
    0
    coolstar is on a distinguished road

      0  

    Default Thanks. Fixed that error, but I have another error.

    Thanks. Fixed that error, but I have another error.


    Thanks. I updated the extension, and now the player works when I open the window once, but after I close it(destroying all the components), I get the following error in firebug:

    n is undefined

    When I try to reopen the window, I get the following error:

    I is undefined
    Here is my code:
    Code:
    new MyDesktop.YoutubeWindow(),
    Code:
    MyDesktop.YoutubeWindow = Ext.extend(Ext.app.Module, {
        id:'yt-win',
        init : function(){
            this.launcher = {
                text: 'Youtube Player',
                iconCls:'tabs',
                handler : this.createWindow,
                scope: this
            }
        },
    
        createWindow : function(){
                    var playerPanel = new Ext.ux.YoutubePlayer({
       		developerKey : DEVELOPER_KEY,	
       		playerId	 : 'myplayer',
       		border		 : false,
       		ratioMode    : 'strict',
       		hideMode     : 'visibility',
       		bgColor 	 : "#000000",
       		bodyStyle 	 : 'background-color:#000000;'
       	});
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('yt-win');
            if(!win){
                win = desktop.createWindow({
                    id: 'yt-win',
                    title:'Youtube Player',
                    width:740,
                    height:480,
                    iconCls: 'tabs',
                    shim:false,
                    animCollapse:false,
                    border:false,
                    constrainHeader:true,
    		minimizable: false,
                    layout: 'fit',
                    items: [playerPanel],
                    bbar	 : new Ext.ux.YoutubePlayer.Control({
            	player   : playerPanel,
            	border	 : false,
            	id 		 : 'control', 
            	style	 : 'border:none;'
                    }),
                    listeners   : {
            	'resize': function(){this.bottomToolbar.fireEvent('resize')}
        	        }
                });
            }
            win.show();
        }
    });
    I am using the Extjs 3.1 desktop.

    Here is the clip from the firebug console after I open the window, close it(destroying the components), and trying to reopen the window:
    I had to send it in a zip, because it is too large, and is 2.7 MB uncompressed.
    Attached Files

  6. #76
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    Quote Originally Posted by coolstar View Post
    Thanks. I updated the extension, and now the player works when I open the window once, but after I close it(destroying all the components), I get the following error in firebug
    No clue. Can you put a demo online so I can take a look at it myself?

  7. #77
    Sencha User
    Join Date
    Oct 2009
    Posts
    44
    Vote Rating
    0
    coolstar is on a distinguished road

      0  

    Default Sorry for the delay. Took me some time to upload, but here is the demo.

    Sorry for the delay. Took me some time to upload, but here is the demo.


    Here is the demo so that you can see for yourself:
    http://coolstar.zxq.net/csos/login.php
    Username: demo
    Password: demo

    Then, click Start > Youtube Player.

    Note: For some reason, the demo doesn't work in IE. I have to resolve that. For now use some other browser. (e.g, Firefox, Chrome, Safari, Opera).

  8. #78
    Sencha User
    Join Date
    Oct 2009
    Posts
    44
    Vote Rating
    0
    coolstar is on a distinguished road

      0  

    Default Reminder.

    Reminder.


    Just a reminder. I put a live demo for you to see:
    http://csos.zxq.net/

    Username: demo
    Password: demo

    Then, click Start > Youtube Player.

    Note: For some reason, the demo doesn't work in IE. I have to resolve that. For now use some other browser. (e.g, Firefox, Chrome, Safari, Opera).

  9. #79
    Sencha User
    Join Date
    Oct 2009
    Posts
    44
    Vote Rating
    0
    coolstar is on a distinguished road

      0  

    Default So can you check the demo?

    So can you check the demo?


    Can you check the demo I put just now?

  10. #80
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    I have checked the demo and can confirm the issue. It seems to be related with the SWFObject. Which Ext version are you using? 3.1?