Skip to content
New issue

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

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

Already on GitHub? # to your account

initFullscreen audio option always true #215

Open
marcelocch opened this issue Jun 7, 2020 · 1 comment
Open

initFullscreen audio option always true #215

marcelocch opened this issue Jun 7, 2020 · 1 comment

Comments

@marcelocch
Copy link

Ionic info:
Ionic CLI : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.1.1
@angular-devkit/build-angular : 0.901.7
@angular-devkit/schematics : 9.1.7
@angular/cli : 9.1.7
@ionic/angular-toolkit : 2.2.0

What version of Streaming-Meda-Cordova-Plugin are you using?
5.26.0
What version of Cordova are you using?
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
What devices are affected?
iphone 8 plus 13.3
Please describe the issue in detail, with relevant code samples
Setting initFullscreen audio option to false, still shows the media player on fullscreen mode.
Here's the full component code:

import { Component } from '@angular/core';
import { StreamingMedia, StreamingAudioOptions} from '@ionic-native/streaming-media/ngx';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  audioStarted:boolean = false;
  options: StreamingAudioOptions = {
    // bgColor: "#000000",
    // bgImage: "www/assets/logo.png",
    // bgImageScale: "fit", // other valid values: "stretch", "aspectStretch"
    initFullscreen: false, // true is default. iOS only.
    keepAwake: true, // prevents device from sleeping. true is default. Android only.
    successCallback: function() {
      console.log('Starting playing audio')
    },
    errorCallback: function(errMsg) {
      console.log("Error, playing audio", errMsg);
    }
  }
  audioURL: string = 'https://us4.internet-radio.com/proxy/wsjf?mp=/stream;';
  constructor(private stream: StreamingMedia) {}
  playAudio(){
    this.stream.playAudio(this.audioURL, this.options);
  }
  pauseAudio(){
    this.audioStarted = !this.audioStarted;
    this.stream.pauseAudio();
  }
  stopAudio(){
    this.audioStarted = false;
    this.stream.stopAudio();
  }
}

What did you expect to happen?
Not showing the media player at all.
What actually happened?
It shows the media player
Simulator Screen Shot - iPhone 8 Plus - 2020-06-06 at 20 21 27
Simulator Screen Shot - iPhone 8 Plus - 2020-06-06 at 20 21 35

@CharlesOnAir
Copy link

Nobody ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants