You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by emilsedgh <gi...@git.apache.org> on 2014/07/21 09:21:01 UTC

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

GitHub user emilsedgh opened a pull request:

    https://github.com/apache/cordova-plugin-media/pull/22

    Progress report for Media plugin

    Fixes CB-7175

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/emilsedgh/cordova-plugin-media master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-media/pull/22.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22
    
----
commit b98eb39882bd47d0c8ccd08bfaede28081e6ddfb
Author: Emil Sedgh <em...@kde.org>
Date:   2014-07-21T07:11:51Z

    Media now takes an additional callback: bufferedCallback.
    This is call when there is progress on buffering remote media.

commit 7c77883debf5325c0b072c289a0e63b9eac8861c
Author: Emil Sedgh <em...@kde.org>
Date:   2014-07-21T07:12:59Z

    Implement Media.onBuffered on bufferedCallbacl on Android platform using MediaPlayer.OnBufferingUpdateListener

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by jsoref <gi...@git.apache.org>.
Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#discussion_r16177685
  
    --- Diff: www/Media.js ---
    @@ -192,4 +195,16 @@ Media.onStatus = function(id, msgType, value) {
     
     };
     
    -module.exports = Media;
    +Media.onBuffered = function(id, buffered) {
    +    var media = mediaObjects[id];
    +
    +    if(media) {
    +        media.bufferedCallback && media.bufferedCallback(buffered);
    --- End diff --
    
    the indentation here doesn't match the indentation of the else block below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by clelland <gi...@git.apache.org>.
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-64912841
  
    That's great, @emilsedgh  -- do you have an ICLA on file with Apache? I can't find your name on the list there, and we usually ask for one from contributors, just so that we know we can use your code without problems. You can see the details here, if you haven't: http://www.apache.org/licenses/#clas
    
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-219899970
  
    Cordova CI Build has one or more failures. 
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-media/pull/22/commits/ce07ef34dd99b5f9663eb8e7c25aa6b2959c7ae5)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17/)
    
    | Builder Name  | Console Output | Test Report | Device Logs  |
    |     :---:     |     :---:      |   :---:     |     :---:    |
    | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-store/artifact/) |
    | [Windows 10  Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-10-store/artifact/) |
    | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=windows-slave,platformName=windows-8.1-phone/artifact/) |
    | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=ios/artifact/) |
    | [Android Mac]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/17//label=mac-slave,platformName=android/artifact/) |
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by houbig <gi...@git.apache.org>.
Github user houbig commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-149181122
  
    http://stackoverflow.com/questions/27835491/is-onbufferingupdate-event-called-every-second-while-playing


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by houbig <gi...@git.apache.org>.
Github user houbig commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-149140909
  
    Hi emilsedgh!
    
    Great job!
    I've added the scope of your lines in my cordova media plugin version 1.0.1, but every time I'm getting this fails:
    
    12:01:29 PM :: 1
    tools.js:593 12:01:30 PM :: 2
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 10);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 40);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 40);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 68);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 68);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 87);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 87);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 100);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 100);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 100);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 100);
    cordova.js:1058 processMessage failed: Error: module org.apache.cordova.media.Media not found
    cordova.js:1059 processMessage failed: Stack: undefined
    cordova.js:1060 processMessage failed: Message: Jcordova.require('org.apache.cordova.media.Media').onBuffered('07a46580-be27-0ccc-148f-30b8177a710f', 100);
    
    Seems the code is working but I can't understand what I need to change to skip this notifications and get the progress of buffering. And another question, how to stop the callback when the buffering is done?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by emilsedgh <gi...@git.apache.org>.
Github user emilsedgh commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-52057885
  
    All issues you mentioned are now fixed, @jsoref.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by emilsedgh <gi...@git.apache.org>.
Github user emilsedgh commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-149175990
  
    What do you mean 'after it reaches 100%'.
    When it reaches 100% its complete of course...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by jsoref <gi...@git.apache.org>.
Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#discussion_r16177733
  
    --- Diff: www/Media.js ---
    @@ -192,4 +195,16 @@ Media.onStatus = function(id, msgType, value) {
     
     };
     
    -module.exports = Media;
    +Media.onBuffered = function(id, buffered) {
    +    var media = mediaObjects[id];
    +
    +    if(media) {
    +        media.bufferedCallback && media.bufferedCallback(buffered);
    +    }
    +    else {
    +         console.error && console.error("Received Media.onBuffered callback for unknown media :: " + id);
    +    }
    +
    +};
    +
    +module.exports = Media;
    --- End diff --
    
    the red null w/ red linefeed means you don't have a newline at the end of your file. please add one.
    
    Also, please file a bug in issues.apache.org/jira and reference it in the commit message (see the contribution guide...)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by houbig <gi...@git.apache.org>.
Github user houbig commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-149174208
  
    Ok I find the solution for the fails. For the new vrsion of plugin I change the plugin calling path to "cordova.require('cordova-plugin-media.Media')"
    
    But still don't understand how to stop gathering the buffering status after it reachs the 100%
    
    I'm not familar with Java :(


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by houbig <gi...@git.apache.org>.
Github user houbig commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-149180907
  
    It loops like 'forever' 100% aproximately every second. I've found on net that it's Samsung bug and trying to add some aditional condition to keep the reaching 100% status and break the callback for that


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by jsoref <gi...@git.apache.org>.
Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#discussion_r16177556
  
    --- Diff: src/android/AudioPlayer.java ---
    @@ -277,6 +280,16 @@ public void onCompletion(MediaPlayer player) {
         }
     
         /**
    +     * Callback to be invoked when progress has been made on buffering media source
    +     *
    +     * @param player           The MediaPlayer that reached the end of the file
    --- End diff --
    
    `that reached the end of file` sounds wrong... based on the callback name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-media pull request: Progress report for Media plugi...

Posted by emilsedgh <gi...@git.apache.org>.
Github user emilsedgh commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/22#issuecomment-64916688
  
    @clelland I just submitted mine. Thank you for finally looking into this :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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