Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
La propiedad 'entonces' no existe en el tipo 'MediaObject'

Estoy intentando crear un reproductor multimedia simple con Ionic 3 y el MediaObject de Ionic-Native me está dando algunos problemas.

aplicación.componente.ts

 import { Component } from '@angular/core'; import { Platform } from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { MediaPlugin, MediaObject } from '@ionic-native/media'; import { HomePage } from '../pages/home/home'; @Component({ templateUrl: 'app.html' }) export class MyApp { rootPage:any = HomePage; file:MediaObject = undefined; constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private media: MediaPlugin) { const onStatusUpdate = (status) => console.log(status); media.create('./path/to/file.mp3', onStatusUpdate) .then((file: MediaObject) => {`` this.file = file; }); } play() { this.file.play(); } }

Mi problema es que cuando sirvo el proyecto obtengo "La propiedad 'entonces' no existe en el tipo 'MediaObject'"

Según tengo entendido, media.create DEBERÍA devolver una promesa de MediaObject que, una vez resuelta, me permitirá usar MediaObject.

Cualquier idea es apreciada.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

el documento dice create Devoluciones: MediaObject no es una promise

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!