Results 1 to 3 of 3

Thread: Dynamically load Video from API (itemTpl)

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default Unanswered: Dynamically load Video from API (itemTpl)

    Good Day All,
    Am developing an App which loads information dynamically from an Api once any item on the list is tapped. some of the fields to be loaded are like title, date, image, video. below are my codes for my model and also the view.

    Code:
    Ext.define('astroSE.model.AstroModelUrl',{
    extend: 'Ext.data.Model',
    
    
    config:         {
    
    
        fields:         ['type','title','description','imageLink','fullBody','strPublishDate','ipadVideoUrl'],
    
    
                    }
    });
    And my view looks like this:
    Code:
    Ext.define('astroSE.view.AstroDetail',{
    extend: 'Ext.DataView',
    
    
    xtype: 'astrodetail',
    
    
    requires: [
    'Ext.Video'
    ],
    
    
    config:{
            xtype:'container',
            scrollable: true,
            styleHtmlContent: true,
            store: 'UrlStore',
            title:'News Feeds',
    
    
    itemTpl:[
                    '{type}<br />',
                    '{title}<br />',
                    '{description}<br />',
                    '<img src="{imageLink}"/><br />',
                    '{fullBody}<br />',
                    '{strPublishDate}<br />',
    
    
                    '<iframe title="You" width="150" height="150" src="{ipadVideoUrl}" frameborder="0" allowfullscreen></iframe>'
    
    
            ]
          }
    });
    My Store is loaded from API everything is showing as i want it once any item on the list is tapped except for the video, i went through Sencha documentation on there website but it does not suit in to what i want. i tried to set this using
    i have tried to use iframes to achieve this but its still not working, everything display(all the fields in my model) except the video. am really Stuck at this place hope someone can help me out. thanks.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Answers
    3901
    Vote Rating
    1271
      0  

    Default

    Why not try to use a <video> tag?

    Also, I have moved this to the ST2 Q&A forum
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    Jun 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default

    Thanks, i just tried using video tags, it loaded the player dynamically but still not playing the video.

Tags for this Thread

Posting Permissions

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