presentMediaPlayerController(with:options:completion:)' has been explicitly marked unavailable here

255 Views Asked by At

I am trying to play sound using the apple watch speakers

I am getting these error messages

'presentMediaPlayerController(with:options:completion:)' is unavailable

also:

WatchKit.WKInterfaceController:28:15: note: 'presentMediaPlayerController(with:options:completion:)' has been explicitly marked unavailable here

and here is the code that generates the error:

    presentMediaPlayerController(with: soundURL, options: ["WKMediaPlayerControllerOptionsAutoplayKey":true]) { (a, b, c) in

    }

Any help is highly appreciated.

0

There are 0 best solutions below