-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIMOB-26533] Ti.Media.Audio player without url set is crashing while…
… registering for event listener (#10457) * [TIMOB-26533]: iOS Ti.Media.Audio player without url set is crashing while registering for event listener * linting issue fixed * [TIMOB-26533] : TiMediaPlayerProxy.m added to compile source
- Loading branch information
1 parent
2325b09
commit b84ca50
Showing
3 changed files
with
48 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* global Ti */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
|
||
describe('Titanium.Media.AudioPlayer', function () { | ||
var audioPlayer; | ||
|
||
beforeEach(function () { | ||
audioPlayer = Ti.Media.createAudioPlayer({ url: '/sample.mp3' }); | ||
}); | ||
|
||
afterEach(function () { | ||
audioPlayer = null; | ||
}); | ||
|
||
it.ios('TIMOB-26533', function (finish) { | ||
// Ti.Media.Audio player without url set is crashing while registering for event listener | ||
audioPlayer = null; | ||
audioPlayer = Ti.Media.createAudioPlayer(); | ||
|
||
try { | ||
audioPlayer.addEventListener('progress', function (e) { | ||
}); | ||
finish(); | ||
} catch (e) { | ||
finish(e); | ||
} | ||
}); | ||
}); |