1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    2
    Vote Rating
    0
    shujaat is on a distinguished road

      0  

    Default Play Video not working

    Code:
    {
           xtype:'panel', 
           flex:1,      
           layout:'vbox',     
           items:
           [ 
               {
                   xtype: 'video',     
                  id:'videoPlayer',          
                  enableControls: true,        
                  url: filePath,        
                  loop: false,       
                  flex:1,        
                  posterUrl: thumbPath,   
               },      
      
              {
                  xtype:'panel',   
                 cls: 'side_detail_bottom_title',        
                 html: 'Video Title: '+title,    
              } 
         ]
    }
    
    I am trying to play a remote video from a server. Problem is that it only play mp4 videos. It doesn't play avi and some other video formats.
    Is there any restrictions on file formats? or something wrong with code or xtype:video?
    Btw I am trying it in chrome.



  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,605
    Vote Rating
    1143
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    HTML5 video will only support certain file formats like mp4
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    158
    Vote Rating
    62
    Notepad123 will become famous soon enough

      0  

    Default

    Do you have a link to a video which should play?I tried using Bunny.m4v from official sencha touch tutorial and it doesn't work.I also tried to use mp4 version which also doesn't work.

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    457
    Vote Rating
    22
    digeridoo will become famous soon enough digeridoo will become famous soon enough

      0  

    Default Not very descriptive

    'Doesn't work' is not a very descriptive answer. Why doesn't it work, what are the errors in the console and how are you implementing it with some example code etc.

    The likelihood here is that it is user error...I can tell you now that there are no issues playing the example video using the default scaffold app if you build a test app using Sencha command...
    I got tired of my stupid username :-)

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    158
    Vote Rating
    62
    Notepad123 will become famous soon enough

      1  

    Default

    Thank you very much for the help.
    I don't understand why I didn't look in the console.
    It clearly said that video can't be found.
    The problem was that IIS didn't have mp4 MIME type defined.
    I apologize for posting.
    I guess it was too late and I wasn't thinking clearly.