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 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Why not try to use a <video> tag?

    Also, I have moved this to the ST2 Q&A forum
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  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
  •