You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/21 08:17:55 UTC

[GitHub] [cordova-plugin-media-capture] NickLusson opened a new issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

NickLusson opened a new issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169


   <!--
   Please have a look at the issue templates you get when you click "New issue" in the GitHub UI.
   We very much prefer issues created by using one of these templates.
   -->
   
   ### Issue Type
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] Bug Report
   - [ ] Feature Request
   - [ ] Support Question
   
   ## Description
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
   
   - [ ] I searched for already existing GitHub issues about this
   - [ ] I updated all Cordova tooling to their most recent version
   - [ ] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] NickLusson removed a comment on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
NickLusson removed a comment on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617215373


   ok, thank you.
   
   here is some code showing the issue, first the html showing 3 statements that I would like the user to record, and the capture audio button, and then the ts file:
   
   When you press the capture audio button it first asks for permission to use the microphone, then it opens the microphone in a full screen that covers the statements that I would like to be read, so the user can record but cannot see the statements they are supposed to read into the microphone.
   
   
   here is the html
   ```
   <ion-content>
     <ion-grid>
       <ion-row>
         <ion-col>
                <h1 class="ion-text-center">Record these statments</h1><br>
               <p class="ion-text-center">
                 Go somewhere quiet.. and record these statements with as much enthusiasim as you can!
               </p>
               1. I am worthy of success. I am worthy of peace.<br><br>
               2. I accept myself as I am. I love myself as I am. I release all limiting thoughts. I honor myself always.<br><br>
               3. I am fearless. I am Powerful.<br><br>
              
                       <div class="ion-text-center">
                         <ion-button color="danger" (click)="captureAudio()">
                           <ion-icon name="mic"></ion-icon>Capture Audio</ion-button>
                       </div>
                     
               <ion-list style="background-color:#f0f0f0">
                 <ion-radio-group value="1" required id="recordingradio">
                 <ion-item *ngFor="let file of mediaFiles" tappable (click)="play(file)" text-wrap>
                   My Recording
                   <ion-radio id="recording" name="recording" required value="1"></ion-radio><br><br><br>
                   <ion-button slot="end" color="success" href="/results" id="submit">
                     <ion-icon name="arrow-forward-circle" slot="start"></ion-icon>Continue</ion-button>
                 </ion-item>
                 </ion-radio-group>
               </ion-list>
         </ion-col>
       </ion-row>
     </ion-grid>
   </ion-content>
   ```
   
   Here is the .ts file
   ```
   import { Component, OnInit, ViewChild } from '@angular/core';
   import { NavController } from '@ionic/angular';
   import { MediaCapture, MediaFile, CaptureError, CaptureVideoOptions } from '@ionic-native/media-capture/ngx';
   import { Storage } from '@ionic/storage';
   import { Media, MediaObject } from '@ionic-native/media/ngx';
   import { File } from '@ionic-native/file/ngx';
   
   const MEDIA_FILES_KEY = 'mediaFiles';
   
   @Component({
     selector: 'app-confidence2',
     templateUrl: './confidence2.page.html',
     styleUrls: ['./confidence2.page.scss'],
   })
   export class Confidence2Page implements OnInit {
     mediaFiles = []
   
     constructor(public navCtrl: NavController, private mediaCapture: MediaCapture, private storage: Storage, private media: Media, private file: File) {}
   
     ionViewDidLoad() {
       this.storage.get(MEDIA_FILES_KEY).then(res => {
         this.mediaFiles = JSON.parse(res) || [];
       });
     }
   
     captureAudio(){
       this.mediaCapture.captureAudio().then(res => {
         this.storeMediaFiles(res);
       }, (err: CaptureError) => console.error(err));
     }
     
     play(myFile) {
       if (myFile.name.indexOf('wav.') > -1) {
         const audioFile: MediaObject = this.media.create(myFile.localURL);
         audioFile.play();
       } else {
         let path = this.file.dataDirectory + myFile.name;
         let url = path.replace(/file^\/\//, '');
         
       }
     }
   
     storeMediaFiles(files) {
       console.log('store: ', files);
       this.storage.get(MEDIA_FILES_KEY).then(res => {
         if (res) {
           let arr = JSON.parse(res);
           arr = arr.concat(files);
           this.storage.set(MEDIA_FILES_KEY, JSON.stringify(arr));
         } else {
           this.storage.set(MEDIA_FILES_KEY, JSON.stringify(files))
         }
         this.mediaFiles = this.mediaFiles.concat(files);
       })
     }
     ngOnInit() {
     }
   }
    ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] NickLusson commented on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
NickLusson commented on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617218155


   ok thank you, I have updated the issue


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] NickLusson removed a comment on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
NickLusson removed a comment on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617029500


   The plugin works.. but it covers the script that I would like my users to read while the microphone is recording. Is there a way to show text on the screen while the microphone is in use?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] NickLusson commented on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
NickLusson commented on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617029500


   The plugin works.. but it covers the script that I would like my users to read while the microphone is recording. Is there a way to show text on the screen while the microphone is in use?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] NickLusson commented on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
NickLusson commented on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617215373


   ok, thank you.
   
   here is some code showing the issue, first the html showing 3 statements that I would like the user to record, and the capture audio button, and then the ts file:
   
   When you press the capture audio button it first asks for permission to use the microphone, then it opens the microphone in a full screen that covers the statements that I would like to be read, so the user can record but cannot see the statements they are supposed to read into the microphone.
   
   
   here is the html
   ```
   <ion-content>
     <ion-grid>
       <ion-row>
         <ion-col>
                <h1 class="ion-text-center">Record these statments</h1><br>
               <p class="ion-text-center">
                 Go somewhere quiet.. and record these statements with as much enthusiasim as you can!
               </p>
               1. I am worthy of success. I am worthy of peace.<br><br>
               2. I accept myself as I am. I love myself as I am. I release all limiting thoughts. I honor myself always.<br><br>
               3. I am fearless. I am Powerful.<br><br>
              
                       <div class="ion-text-center">
                         <ion-button color="danger" (click)="captureAudio()">
                           <ion-icon name="mic"></ion-icon>Capture Audio</ion-button>
                       </div>
                     
               <ion-list style="background-color:#f0f0f0">
                 <ion-radio-group value="1" required id="recordingradio">
                 <ion-item *ngFor="let file of mediaFiles" tappable (click)="play(file)" text-wrap>
                   My Recording
                   <ion-radio id="recording" name="recording" required value="1"></ion-radio><br><br><br>
                   <ion-button slot="end" color="success" href="/results" id="submit">
                     <ion-icon name="arrow-forward-circle" slot="start"></ion-icon>Continue</ion-button>
                 </ion-item>
                 </ion-radio-group>
               </ion-list>
         </ion-col>
       </ion-row>
     </ion-grid>
   </ion-content>
   ```
   
   Here is the .ts file
   ```
   import { Component, OnInit, ViewChild } from '@angular/core';
   import { NavController } from '@ionic/angular';
   import { MediaCapture, MediaFile, CaptureError, CaptureVideoOptions } from '@ionic-native/media-capture/ngx';
   import { Storage } from '@ionic/storage';
   import { Media, MediaObject } from '@ionic-native/media/ngx';
   import { File } from '@ionic-native/file/ngx';
   
   const MEDIA_FILES_KEY = 'mediaFiles';
   
   @Component({
     selector: 'app-confidence2',
     templateUrl: './confidence2.page.html',
     styleUrls: ['./confidence2.page.scss'],
   })
   export class Confidence2Page implements OnInit {
     mediaFiles = []
   
     constructor(public navCtrl: NavController, private mediaCapture: MediaCapture, private storage: Storage, private media: Media, private file: File) {}
   
     ionViewDidLoad() {
       this.storage.get(MEDIA_FILES_KEY).then(res => {
         this.mediaFiles = JSON.parse(res) || [];
       });
     }
   
     captureAudio(){
       this.mediaCapture.captureAudio().then(res => {
         this.storeMediaFiles(res);
       }, (err: CaptureError) => console.error(err));
     }
     
     play(myFile) {
       if (myFile.name.indexOf('wav.') > -1) {
         const audioFile: MediaObject = this.media.create(myFile.localURL);
         audioFile.play();
       } else {
         let path = this.file.dataDirectory + myFile.name;
         let url = path.replace(/file^\/\//, '');
         
       }
     }
   
     storeMediaFiles(files) {
       console.log('store: ', files);
       this.storage.get(MEDIA_FILES_KEY).then(res => {
         if (res) {
           let arr = JSON.parse(res);
           arr = arr.concat(files);
           this.storage.set(MEDIA_FILES_KEY, JSON.stringify(arr));
         } else {
           this.storage.set(MEDIA_FILES_KEY, JSON.stringify(files))
         }
         this.mediaFiles = this.mediaFiles.concat(files);
       })
     }
     ngOnInit() {
     }
   }
    ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-media-capture] timbru31 commented on issue #169: The microphone covers the entire screen... I would like users to read short statements from the screen while the microphone is recording.. Is there a way to show text while the microphone is recording?

Posted by GitBox <gi...@apache.org>.
timbru31 commented on issue #169:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/169#issuecomment-617181245


   Thanks a lot for your issue, however the issue template exists for a reason. 😊   
   It helps us to debug the issue further and to provide a solution much faster. With important information missing, we unfortunately can't help you.
   
   Therefore, please edit this issue accordingly or close and create a new one and make sure to provide all the required information.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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