Results 1 to 8 of 8

Thread: Video in Carousel

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Question Video in Carousel

    I've tried to put a video in the Carousel but it doesn't work, is it normal?

    Here is my code :
    Code:
    items: [{
        title: 'Tab 1',
        html: <div><video width="640"  height="360" src="http://www.youtube.com/demo/google_main.mp4"  controls autobuffer>
    
    </video></div>
    }, {
    ...

  2. #2
    Sencha User aw1zard2's Avatar
    Join Date
    Sep 2009
    Location
    Dallas, Texas
    Posts
    589

    Default

    Quote Originally Posted by ludm View Post
    I've tried to put a video in the Carousel but it doesn't work, is it normal?

    Here is my code :
    Code:
    items: [{
        title: 'Tab 1',
        html: '<div><video width="640"  height="360" src="http://www.youtube.com/demo/google_main.mp4"  controls autobuffer></video></div>'
    }, {
    ...
    If you copied and pasted this your missing the ' ' on the html: line. I marked the ' in red for what is missing.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Default

    It's just a copy and paste mistake, I had the '', so it doesn't come from here

  4. #4
    Ext JS Premium Member Foggy's Avatar
    Join Date
    Apr 2007
    Location
    Switzerland
    Posts
    477

    Default

    you cant have newlines in a js string...

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Default

    Oups, it's ok now, you were right I had a new line.

    Thank you for your help, now I have to see how to stop the video when i go to the next slide in the carousel.

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243

    Default

    You can call the stop() method on the video tag inside the deactivate event fired on the card that contains the video.

  7. #7

    Default

    Can you give a code example because mine does not seem to be working.

    Code:
    listeners: {
                    cardswitch: function(){
                        video.stop();
                    }
                },

  8. #8
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Default Solution to stop a video after changing tab

    Code:
    var myTab= new Ext.TabPanel({
                        cardSwitchAnimation : 'fade',
                       items:[carrousel_4,videoPanel],
                    listeners : {
                        cardswitch : function() {
    // you have to put id="myVideo" in the <video><video/>  element    
                            var mavideo = document.getElementById("myVideo"); 
                            mavideo.pause();
                        }
                    }

Similar Threads

  1. Will the EXT JS 4.0 get the video component?
    By aw1zard2 in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 18 May 2010, 8:31 AM
  2. to open a video
    By sakaext in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Oct 2009, 12:39 AM
  3. video streming
    By andryi in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 5 Aug 2009, 10:24 AM
  4. Displaying a Flash Video
    By Dumas in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 8 Jun 2009, 8:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •