cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject cordova-plugin-media git commit: CB-11313: Can't start media streaming on Android 6.0 (test case)
Date Wed, 08 Jun 2016 01:41:38 GMT
Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master e8d41da68 -> e58211271


CB-11313: Can't start media streaming on Android 6.0 (test case)


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/e5821127
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/e5821127
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/e5821127

Branch: refs/heads/master
Commit: e58211271c1b6b451c29e4c585d965870ceb8d48
Parents: e8d41da
Author: Simon MacDonald <simon.macdonald@gmail.com>
Authored: Tue Jun 7 21:41:29 2016 -0400
Committer: Simon MacDonald <simon.macdonald@gmail.com>
Committed: Tue Jun 7 21:41:29 2016 -0400

----------------------------------------------------------------------
 tests/tests.js | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/e5821127/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 5caba11..bcc29a4 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -402,6 +402,34 @@ exports.defineAutoTests = function () {
             media1.setRate(2);
             media1.play();
         }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
+
+        it("media.spec.25 should be able to play an audio stream", function (done) {
+            // no audio hardware available
+            if (!isAudioSupported) {
+                pending();
+            }
+
+            var mediaFile = 'http://209.73.138.20:80',
+                successCallback,
+                context = this,
+                flag = true,
+                statusChange = function (statusCode) {
+                    console.log("status code: " + statusCode);
+                    if (statusCode == Media.MEDIA_RUNNING && flag) {
+                        //flag variable used to ensure an extra security statement to ensure
that the callback is processed only once,
+                        //in case for some reason the statusChange callback is reached more
than one time with the same status code.
+                        //Some information about this kind of behavior it can be found at
JIRA: CB-7099
+                        flag = false;
+                        expect(true).toBe(true);
+                        media1.stop();
+                        media1.release();
+                        done();
+                    }
+                };
+
+            var media1 = new Media(mediaFile, successCallback, failed.bind(null, done, 'media1
= new Media - Error creating Media object. Media file: ' + mediaFile, context), statusChange);
// jshint ignore:line
+            media1.play();
+        }, ACTUAL_PLAYBACK_TEST_TIMEOUT);
     });
 };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message