Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE48910A23 for ; Fri, 2 Aug 2013 16:16:38 +0000 (UTC) Received: (qmail 9394 invoked by uid 500); 2 Aug 2013 16:16:38 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 9166 invoked by uid 500); 2 Aug 2013 16:16:36 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 9152 invoked by uid 99); 2 Aug 2013 16:16:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 16:16:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wjamesjong@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 16:16:27 +0000 Received: by mail-ob0-f176.google.com with SMTP id uz19so1530839obc.35 for ; Fri, 02 Aug 2013 09:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to:x-mailer; bh=TEDvgB4ALkhi4A9ISzWoAm3mSGWTT4QsfD9LDTFei0M=; b=wnSMEuyRsocFURyKMV0fi5ZAWVEWG+gdcVDrcGkl36tpMIG08pcTh2Wha+9ViHrtyu 6Yig/+ZShsPsXwlu1REkjiAIM0DglUm268n+PH7gMR9+e3mGaFjHWqk6GWN/0H6PkUOq AX0FKGhJZFLRH0RCglQ20fT2JV1n3wlhTqoYXJHWSFF3ibHwn0ObZWIPOPmJ5zcT8O4T Vik3sC4aBIjIzcs5xeJqLvGa7GhbsLAFVu63Ckf2a1mSfXtSQd/driEX/fA9ggjaR56e AGUue/PM/A2zEw3DNls0Sz6ju9cc8wH3nkEt/tWG0g6GLklGdZzSuVyz98Z0GkPHzEwJ g8IQ== X-Received: by 10.182.45.195 with SMTP id p3mr5884380obm.29.1375460165909; Fri, 02 Aug 2013 09:16:05 -0700 (PDT) Received: from dhcp-9-27-49-214.raleigh.ibm.com ([129.33.49.236]) by mx.google.com with ESMTPSA id hm1sm8959339obb.9.2013.08.02.09.16.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 Aug 2013 09:16:04 -0700 (PDT) From: James Jong Content-Type: multipart/signed; boundary="Apple-Mail=_4E020051-1DF1-4CFB-BA7C-80B6EF947117"; protocol="application/pgp-signature"; micalg=pgp-sha512 Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: [plugins] Proper handling of subsequant calls in Media plugin Date: Fri, 2 Aug 2013 12:15:30 -0400 References: To: dev@cordova.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_4E020051-1DF1-4CFB-BA7C-80B6EF947117 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 For iOS, a play during play state would restart the audio at the = beginning. I agree we should have a consistent behavior that is = documented. -James Jong On Aug 2, 2013, at 11:33 AM, Lorin Beer = wrote: > I ran into this sometime ago on the android media API. The relevant > conversation is likely deeply buried, and we should consider = documenting > the appropriate behavior somewhere permanent. >=20 > My opinion is that appropriate behavior is dependent on the function = being > called and the current state. A FSM could capture this. > In terms of during state, I would recommend that the = plugin > executes the latest command normally, playing media from a new source = or > restarting the currently executing media as if the play command had = been > received in the state. >=20 > - Lorin >=20 >=20 > On Thu, Aug 1, 2013 at 1:47 PM, Benn Mapes = wrote: >=20 >> Working on https://issues.apache.org/jira/browse/CB-3783, it appears = that >> there is no documentation on how the media plugin should handle = subsequent >> calls of the same function. >>=20 >> An example would be calling my_media.play() multiple times when the >> my_media is already playing. Should this be swallowed by the plugin = and >> ignored? Should we respond with a >> MediaError< >> = http://cordova.apache.org/docs/en/3.0.0/cordova_media_media.md.html#MediaE= rror >>> .MEDIA_ERR_ABORTED >> and a message saying the media is already playing? What about = subsequent >> calls to my_media.pause() when the media is already paused? >>=20 >> Was just wondering what other platforms have implemented for this and = what >> the proper way of handling subsequent calls is. >>=20 >> ~Benn >>=20 --Apple-Mail=_4E020051-1DF1-4CFB-BA7C-80B6EF947117 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJR+9tDAAoJEDGEz2BOh5dbR9QH/RoSdHWmNZOgLmRdeikGtaRj 5E19pHBYq/BdjOjCBOn6uDlGtQSGsoKAHyEIEQ2Kbr7+WiHPAgjE5fSws5TihnOO FitWSD7wpQJlg6Bf07Iq9fHGNTuK6Rvi/Kk6dMIdjJfWtHlY5NA0r2ZkV8yE+n9d Tmagf8EnrqVmrmGAxMG22K5E9v//PrKTBZYcS+xHs8imvYm8itP+DNymg31OEyTq XvdiwhTKJjqF2zE1ebNrltiyx8FRjH+rlcLfMLh+V5eh8qzjXMNVDNiF2NAvs1bB uuDYQKUSD2yMynQiHv+I97SjCMjIxuI70pIZPh27G63jsdEEV1z0VwW/SH4SPqY= =ZFAq -----END PGP SIGNATURE----- --Apple-Mail=_4E020051-1DF1-4CFB-BA7C-80B6EF947117--