Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- properly handle background audio for ios 4.0
- fixed double alert problem and added test case (iphone) - show activity indicator when loading video (iphone)
- Loading branch information
Jeff Haynie
committed
Jul 5, 2010
1 parent
214b331
commit aaf61c3
Showing
34 changed files
with
410 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,6 @@ activeMovie.play(); | |
|
||
|
||
win.addEventListener('close', function() { | ||
alert("Window closed"); | ||
activeMovie.stop(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var win = Ti.UI.currentWindow; | ||
|
||
|
||
var button = Ti.UI.createButton({ | ||
title:"Start", | ||
width:100, | ||
height:40, | ||
bottom:20 | ||
}); | ||
|
||
win.add(button); | ||
|
||
var text = Ti.UI.createLabel({ | ||
text:"Click the button to start the audio and then exit the app.\n\nThe audio should continue playing and you can use the controls to control the media.", | ||
width:"auto", | ||
height:"auto", | ||
top:10, | ||
left:10, | ||
right:10 | ||
}); | ||
|
||
win.add(text); | ||
|
||
var sound = Titanium.Media.createSound({url:'../cricket.wav'}); | ||
|
||
button.addEventListener('click',function() | ||
{ | ||
sound.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK; | ||
sound.looping = true; | ||
sound.play(); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Using the __IPHONE_OS_VERSION_MAX_ALLOWED macro is not a good idea - it will cause crashes on 3.2 and earlier. Use +[TiUtils isiOS4OrGreater] instead, especially when calling methods which do not exist in earlier iOS versions.