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

Fix #5627 : Stop recording should stop microphone and angular-recorder should be replaced. #6708

Merged
merged 34 commits into from
Jun 1, 2019

Conversation

mzaman07
Copy link
Contributor

@mzaman07 mzaman07 commented May 7, 2019

Explanation

Fixes #5627 by stopping the microphone stream when user stops recording. Fixes #6388 by replacing the angular-recorder library. Design doc provides more background info on changes and the reasoning for choosing this method.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue.

@mzaman07
Copy link
Contributor Author

mzaman07 commented May 7, 2019

Looking for feedback on design, code for the rough setup I have.

So this is still a WIP, there is an issue when you click on stateTranslation when recording.
Steps to reproduce.

  1. Set $rootScope.loadingMessage = 'loading' in line 406 in AudioTranslationBarDirective.ts
  2. Create a full exploration that is capable of having multiple translations.
  3. Start recording
  4. Click on different tab on StateTranslation during the recording.

The result of this will be the page will be stuck in "loading..."

When $rootScope.loadingMessage = '' it works fine but based on running debugger for initAudioBar it shows the message as blank/ not obviously visible.

@mzaman07
Copy link
Contributor Author

mzaman07 commented May 9, 2019

Once I figure out how to set a web-worker script to play nicely with the typescript compiler, I think those tests will pass. I will also write a test for it as well.

@mzaman07
Copy link
Contributor Author

mzaman07 commented May 13, 2019

Is it okay that I include https://github.com/microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts as part of the typings. I need it so it can compile to ts, if I need to cut this down I will do that.

@seanlip
Copy link
Member

seanlip commented May 13, 2019

/cc @ankita240796 (who is our authority on TypeScript!)

@ankita240796
Copy link
Contributor

Is it okay that I include https://github.com/microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts as part of the typings. I need it so it can compile to ts, if I need to cut this down I will do that.

Hi @mzaman07, can it be not added in typings present in node_modules folder, why do we need it in custom typings?

@mzaman07
Copy link
Contributor Author

mzaman07 commented May 13, 2019

I see it is already there, ok I'll just use that instead. The reason for adding was that I wasn't sure if it was already in the codebase.

@nithusha21
Copy link
Contributor

Hi @mzaman07 please note the failing tests.

@oppiabot
Copy link

oppiabot bot commented May 14, 2019

Hi @mzaman07. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

@DubeySandeep
Copy link
Member

@YashJipkate, Can you please review this PR? (As discussed in the meeting!)

Copy link
Contributor

@apb7 apb7 left a comment

Choose a reason for hiding this comment

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

LGTM from code owner's perspective. Thanks, @mzaman07!

package.json Show resolved Hide resolved
@apb7 apb7 removed their assignment May 28, 2019
Copy link
Contributor

@ankita240796 ankita240796 left a comment

Choose a reason for hiding this comment

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

LGTM from code owner's perspective, Thanks @mzaman07!

core/templates/dev/head/AppInit.ts Outdated Show resolved Hide resolved
package-lock.json Show resolved Hide resolved
@vojtechjelinek
Copy link
Contributor

vojtechjelinek commented May 29, 2019

@mzaman07 Please, also add "Fixes #6388" to the description so it is closed automatically.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

LGTM as codeowner, thanks @mzaman07!

Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

LGTM from a codeowner's perspective.

Copy link
Member

@DubeySandeep DubeySandeep left a comment

Choose a reason for hiding this comment

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

@mzaman07, Can you please update your PR with upstream, I'm unable to merge this PR as the codecov tests are not running. Also, I've left a few comments (simple nit) related to code comment It would be great if we can fix those and merge this PR quickly! :)

/cc @oppia/dev-workflow-team

@mzaman07
Copy link
Contributor Author

mzaman07 commented Jun 1, 2019

Dunno why the codecov is not working. I'll write tests going through all of Voiceover component then. It could be it's own test script or expand on explorationTranslationTab.js .

Edit: Looks like I'll need touch these settings to make tests work. For now I'll just push without tests.

@lilithxxx
Copy link
Contributor

Ok I guess I see a pattern. @mzaman07 are you using your own instance of circleci? This is creating problems with the codecov tests.

/cc @oppia/dev-workflow-team

@apb7
Copy link
Contributor

apb7 commented Jun 1, 2019

Hi @mzaman07, can you please temporarily unfollow mzaman07/oppia by visiting https://circleci.com/gh/organizations/mzaman07/settings#projects? Once you've done that, update your branch to re-trigger the builds at oppia/oppia. This will un-stall codecov. Thanks!

@mzaman07
Copy link
Contributor Author

mzaman07 commented Jun 1, 2019

Oh I see ok thanks. Yeah I was using my own to test something awhile back.

@DubeySandeep DubeySandeep merged commit 5fad146 into oppia:develop Jun 1, 2019
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.

Angular recorder error with plugin Oppia appears to continue recording audio after leaving translation tab
9 participants