This is now possible as of watchOS 2 using WKAudioFilePlayer
or WKInterfaceMovie
.
NSURL *assetURL = [[NSBundle mainBundle] URLForResource:@"file" withExtension:@"wav"];
WKAudioFilePlayer
example:
WKAudioFileAsset *asset = [WKAudioFileAsset assetWithURL:assetURL];
WKAudioFilePlayerItem *playerItem = [WKAudioFilePlayerItem playerItemWithAsset:asset];
WKAudioFilePlayer *audioFilePlayer = [WKAudioFilePlayer playerWithPlayerItem:playerItem];
[audioFilePlayer play];
WKInterfaceMovie
example:
[self presentMediaPlayerControllerWithURL:assetURL options:nil completion:nil];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…