Results 1 to 2 of 2

Thread: container doesn't scroll with video + dataview

  1. #1
    Sencha User
    Join Date
    May 2017
    Posts
    39
    Answers
    9

    Default Answered: container doesn't scroll with video + dataview

    the follow code doesnt work to scroll container with video and dataview, anyone? i'm struggle with it


    Code:
    Ext.define('Club.view.SharedVideo', {
      extend: 'Ext.Container',
    
    
      xtype: 'sharedvideo',
    
    
      requires: [
      ],
    
    
      id: 'sharedvideo',
    
    
      initialize:function(){
        this.callParent()
      },
    
    
      load: function(params){
        var that = this
        this.url = params.url
        this.contentid = params.contentid
        this.video = Ext.create('Ext.Video',{
          cls: Ext.baseCSSPrefix + 'videoshared',
          layout:'fit',
          width:'100%',
          height: '400px',
          controls:false,
          loop:true,
          preload: true,
          autoResume: false,
          muted: true,
          url: that.url,
          posterUrl: that.url.replace('.mp4','.jpg')
        })
        this.video.play()
        var videoselector = this.video.element.dom.querySelector('video')
        videoselector.setAttribute('webkit-playsinline','')
        videoselector.setAttribute('playsinline','')
    
    
        //that.likes = Ext.Create
        var store=Ext.create('Club.store.Action',{
          params:{ id: that.contentid },
          listeners:{
            load: function( store, records, successful, operation, eOpts ){ }
          }
        })
        this.add([
          that.video
          ,
          {
            xtype: 'label',
            style:'margin-left:5px;margin-top:410px',
            html: '<b>Curtidas</b>'
          },
          {
              height:'100%',
              scrollable: false,
              width:'100%',
              style:'background:#fff;margin-left:5px;margin-top:430px',
              xtype: 'dataview',
              itemTpl: '<div>{username}</div>',
              store: store
          }
        ])
      },
    
    
      config: {
        scrollable:true,
        fullscreen: true,
        styleHtmlContent: true,
        layout: 'fit',
        height:'100%',
        items:[
          {
            xtype: 'toolbar',
            docked: 'top',
            ui: 'clean',
            title: 'Video',
            items: [
              {
                xtype: 'button',
                text: 'Voltar',
                ui: 'back',
                handler: function(){
                }
              }
            ]
          }
        ]
      }
    });

  2. add it in a container fixed it

  3. #2
    Sencha User
    Join Date
    May 2017
    Posts
    39
    Answers
    9

    Default

    add it in a container fixed it

Similar Threads

  1. Replies: 1
    Last Post: 7 Jul 2016, 2:42 PM
  2. Dataview.dataview and Container: why back button of Container not working???
    By andvitiello in forum Sencha Touch 2.x: Discussion
    Replies: 5
    Last Post: 24 Jul 2014, 12:59 AM
  3. Replies: 2
    Last Post: 31 Mar 2014, 6:11 AM
  4. How do I debug a dataview that doesn't scroll?
    By hofo in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 31 Oct 2012, 8:43 AM
  5. Video object doesn't scroll inside Panel
    By Guaito in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 21 Sep 2010, 6:10 AM

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
  •