Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): Progress report for Media plugin (CB-7175) #22

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

emilsedgh
Copy link

Fixes CB-7175

This is call when there is progress on buffering remote media.
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that reached the end of file sounds wrong... based on the callback name.

@emilsedgh
Copy link
Author

All issues you mentioned are now fixed, @jsoref.

@clelland
Copy link
Contributor

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!

@emilsedgh
Copy link
Author

@clelland I just submitted mine. Thank you for finally looking into this :)

@houbig
Copy link

houbig commented Oct 19, 2015

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?

@houbig
Copy link

houbig commented Oct 19, 2015

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 :(

@emilsedgh
Copy link
Author

What do you mean 'after it reaches 100%'.
When it reaches 100% its complete of course...

@houbig
Copy link

houbig commented Oct 19, 2015

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

@cordova-qa
Copy link

Cordova CI Build has one or more failures.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Mac Link Link Link

@janpio
Copy link
Member

janpio commented Aug 18, 2018

Hey @emilsedgh, I know it has been a long time but there are conflicts now. Could you maybe rebase you branch on master to get those fixed? Thanks.

@janpio janpio changed the title Progress report for Media plugin feat(android): Progress report for Media plugin (CB-7175) Jul 3, 2019
Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard conflict unfortunately, we will have to look into possibly recreating this PR on the current code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants