Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1918] iOS 7 Background mode "audio" controller does not work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2013-10-07T22:46:43.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsaudio, audioplayer, background, io7, ios6, video, videoplayer
ReporterEzoom Agency
AssigneeMostafizur Rahman
Created2013-09-27T14:48:32.000+0000
Updated2016-03-08T07:40:50.000+0000

Description

When your app goes background playing a song, the control center "pause" button won't actually pause it. Tested with iOS6 and iOS7 device, not sure if it's related do 3.1.3 or argeting iOS7. add: info.plist
<key>UIBackgroundModes</key><array><string>audio</string></array>
Player code:
var videoPlayer = Ti.Media.createVideoPlayer({
    backgroundColor:'#fff', 
    autoplay:true,
    url:'mySong.mp3'
})
Ti.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;
videoPlayer.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;
videoPlayer.play();

Comments

  1. Ezoom Agency 2013-09-27

    "pause" button does not work for videoPlayer, but work for createSound.
  2. Radamantis Torres-Lechuga 2013-10-07

    Tested on iPhone 5c with iOS 7.0.2 Titanium SDK 3.1.3 Xcode 5
  3. Ezoom Agency 2013-10-08

    Tested with iPhone 5?iPhone 4?iPad 3?iPad 1? I used this devices in different iOS versions and it happens when using videoPlayer in background.

JSON Source