Discovered a weird problem with my app. Trying to play a video in a loop (see the code below). VideoPlayer repeatMode
is set to Ti.Media.VIDEO_REPEAT_MODE_ONE
. Works in simulator, works on iPhone 4s, works on iPad Air... does not work on iPhone 4 (all of them running iOS 7.1.1 apart from simulator - 7.1).
Exact symptoms: after one play video should restart from beginning, but it stops. If controls are available, I can press play to start playing it again, then after reaching the end it stops again.
I could swear that it worked on iPhone 4 before the 7.1 upgrade, but somehow it stopped.
Anyone could replicate this issue? Or have any idea?
Sys info:
- Titanium SDK: Tested with 3.2.3.GA; 3.2.2.GA; 3.2.1.GA; 3.2.0.GA
- Platform & version: iOS 7.1.1
- Device: works on iPhone 4s, iPad Air, simulator; fails on iPhone 4
- Host Operating System: OSX 10.9.2
- Titanium Studio: 3.2.3.201404181442
- Xcode: 5.1.1 (5B1008)
- Alloy: 1.3.1
Code for basic Alloy project to replicate:
index.js
var videoPlayer = Titanium.Media.createVideoPlayer({ autoplay : true, fullscreen : false, mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT, repeatMode: Ti.Media.VIDEO_REPEAT_MODE_ONE, scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT }); //Video is 12s long so it is easy to notice that it does not loop. videoPlayer.url = "video/candles.mp4"; $.index.add(videoPlayer); $.index.open();
index.xml
<Alloy> <Window class="container"> </Window> </Alloy>I would appreciate any suggestions.