Note that there are some explanatory texts on larger screens.

plurals
  1. POTitanium Android videoPlayer loads, has endPlaybackTime, just won't play
    primarykey
    data
    text
    <p>I'm trying to play a video on Android and having some weird issues, I've stripped my code right back to the following to try and separate it from any view issues elsewhere in my app... the file does seems to be loading, the following comments are the console log which shows it has the video file size and playable duration. However, the playback controls show 0 length, and just a black screen. The video is an mp4, it plays fine, I can only assume the emulator/devices I've tried this on support the format and it's not corrupt, as they are able to read it's duration... what else could stop it playing?!</p> <pre><code>var file = Ti.Filesystem.getFile('file:///data/data/com.app.applite/app_appdata/master/D9E3BC7A_225C_458B_B298_C4.mp4'); console.log('Size: '+file.size); // Size: 269245 var activeMovie = Titanium.Media.createVideoPlayer({ url : file.nativePath, backgroundColor : 'blue', movieControlMode : Titanium.Media.VIDEO_CONTROL_FULLSCREEN, scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT, fullscreen : true, autoplay : true }); activeMovie.addEventListener('loadstate', function(evt) { console.log( JSON.stringify(evt)); // "playableDuration":8315 Correct duration!!! // {"type":"loadstate","source":{"autoplay":true,"currentPlaybackTime":0,"bubbleParent":true,"playableDuration":8315,"rect":{"height":854,"y":0,"x":0,"width":480},"keepSc reenOn":false,"url":"file:///data/data/com.app.applite/app_appdata/master/D9E3BC7A_225C_458B_B298_C4.mp4","size":{"height":854,"y":0,"width":480,"x":0},"volume":1," endPlaybackTime":8315,"backgroundColor":"blue","playing":true,"playbackState":1,"mediaControlStyle":2,"duration":8315,"movieControlMode":2,"scalingMode":2,"initialPlaybac kTime":0,"loadState":1,"backgroundRepeat":false,"movieControlStyle":2,"children":[],"fullscreen":true,"_events":{"loadstate":{}}},"currentPlaybackTime":0,"loadState":0,"b ubbles":true,"cancelBubble":false} activeMovie.play(); }); // Tried with and without these, makes no difference activeMovie.show(); activeMovie.play(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload