Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14885

Android: VideoPlayer can't play certain remote mp4 files

    Details

      Description

      Issue

      Despite the fact both links are working and have the same conditions (same encoding and the same server) just fail to play.

      Video formats

      Both video files have Format H.264, Audio decoder AAC Tag 255.

      On new HTC 4.1.2

      This file can be played:

      But not this one:

      On Galaxy Note 4.1.2

      None of them work

      Droid Razr 2.3.5

      Both are working

      Snippet code

      To reproduce just throw this code into an app.js and wait till video starts.

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      // create tab group
      var tabGroup = Titanium.UI.createTabGroup();
       
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      var vidplayer = Ti.Media.createVideoPlayer({
      	width:Ti.UI.FILL,
      	height:Ti.UI.FILL,
      	//url:'http://d269mq2d9sw4la.cloudfront.net/eSchool-video/13Q1-DannySilk-CultureOfHonor/13Q1-DannySilk-CultureOfHonor01.mp4'
      	url:'http://d269mq2d9sw4la.cloudfront.net/eSchool-video/09Q2-MikeBickle-1stCommandment/09Q2-MikeBickle-1stCommandment02.mp4'
      });
      win1.add(vidplayer);
      var tab1 = Titanium.UI.createTab({  
          icon:'KS_nav_views.png',
          title:'Tab 1',
          window:win1
      });
       
      var label1 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 1',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      win1.add(label1);
       
      //
      // create controls tab and root window
      //
      var win2 = Titanium.UI.createWindow({  
          title:'Tab 2',
          backgroundColor:'#fff'
      });
      var tab2 = Titanium.UI.createTab({  
          icon:'KS_nav_ui.png',
          title:'Tab 2',
          window:win2
      });
       
      var label2 = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 2',
      	font:{fontSize:20,fontFamily:'Helvetica Neue'},
      	textAlign:'center',
      	width:'auto'
      });
       
      win2.add(label2);
       
       
       
      //
      //  add tabs
      //
      tabGroup.addTab(tab1);  
      tabGroup.addTab(tab2);  
       
       
      // open tab group
      tabGroup.open();
      

      Stack traces

      https://gist.github.com/egomez99/50b4fd78eeba02119c2a

      Additional info

      Logs seem to evidence an error related to AwesomePlayer where is "Error: 1,-2147483648". Discussion topics suggest adding permissions in to manifest sections. E.g.
      http://www.weston-fl.com/blog/?p=2988
      http://stackoverflow.com/questions/11777595/playing-a-downloaded-video-error-1-2147483648

      However does not seem to work.

      <uses-permission android:name="android.permission.INTERNET"/>
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
      <uses-permission android:name="android.permission.WRITE_INTERAL_STORAGE" />
      

      If this is an AwesomePlayer issue that is equipped already on recent devices, is there a way to detect it? Possibly using the Package manager to get information related to the application packages. http://developer.android.com/reference/android/content/pm/PackageManager.html

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17212
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration