nchutchind / cordova-plugin-streaming-media

Simple plugin for loading full screen streaming video or audio.
MIT License
391 stars 284 forks source link

initFullscreen audio option always true #215

Open marcelocch opened 4 years ago

marcelocch commented 4 years ago

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 commented 4 years ago

Nobody ?