Results 1 to 2 of 2

Thread: How to load dynamically (reload video src) in Ext.Video ?

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

    Default Answered: How to load dynamically (reload video src) in Ext.Video ?

    try to reload a new video in existend Ext.Video. How to do?

    Code:
    itemtap: function( dataview, index, target, record, e, eOpts ){
                  var url=record.data.posts[0].url
                  var video = Ext.getCmp('myvideo')
                  video.setPosterUrl(url.replace('.mp4','.jpg'))
                  video.setUrl([url])
    }

  2. Added the video in a container. So I can remove and add items. I don't how expensive is it but works as supposed .


    Code:
    Ext.define('VideoPlayer', {
      extend: 'Ext.Container',
    
    
      xtype: 'videoplayer',
    
    
      requires: [
      ],
    
    
      initialize: function(){
      },
    
    
      loadvideo: function(url){
        this.removeAll(true,true)
    
        this.add([
          {
            xtype:'video',
            controls:false,
            loop:true,
            preload: true,
            url: url,
            autoResume: false
          }
        ])
    
    })

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

    Default

    Added the video in a container. So I can remove and add items. I don't how expensive is it but works as supposed .


    Code:
    Ext.define('VideoPlayer', {
      extend: 'Ext.Container',
    
    
      xtype: 'videoplayer',
    
    
      requires: [
      ],
    
    
      initialize: function(){
      },
    
    
      loadvideo: function(url){
        this.removeAll(true,true)
    
        this.add([
          {
            xtype:'video',
            controls:false,
            loop:true,
            preload: true,
            url: url,
            autoResume: false
          }
        ])
    
    })

Similar Threads

  1. Ext.Video Plays audio but no video until the video is clicked.
    By English in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 3 May 2013, 10:08 AM
  2. Dynamically load Video from API (itemTpl)
    By cosmas007 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 26 Jun 2012, 6:10 PM
  3. xtype: video to load external video from webserver
    By jbrown13 in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 27 May 2012, 1:25 PM
  4. How to Reload new video url in Ext.Video Component
    By PoloMarco in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 10 Aug 2011, 5:28 AM
  5. How reload video after changing url?
    By Jaeger in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 13 Dec 2010, 10:37 PM

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
  •