Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 使用AVPlayer播放.pls播放列表_Objective C_Ios_Audio_Playlist - Fatal编程技术网

Objective c 使用AVPlayer播放.pls播放列表

Objective c 使用AVPlayer播放.pls播放列表,objective-c,ios,audio,playlist,Objective C,Ios,Audio,Playlist,我正在尝试在iOS设备上播放.pls音频流,但它似乎不起作用,这就是我目前正在做的 @synthesize player; - (void)viewDidLoad { [super viewDidLoad]; self.player = [AVPlayer playerWithURL:[NSURL URLWithString:@"mypls.pls"]]; } - (IBAction)pushStart:(id)sender { [player pl

我正在尝试在iOS设备上播放.pls音频流,但它似乎不起作用,这就是我目前正在做的

@synthesize player;

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.player = [AVPlayer playerWithURL:[NSURL URLWithString:@"mypls.pls"]];   


}
- (IBAction)pushStart:(id)sender {
        [player play];
}

当您使用.pls流时,实际上您只需打开一个播放列表,并将IP连接到该流。
您必须在代码中使用此IP而不是.pls文件,因此您不必链接到.pls文件,而是链接到URL字段中的流。

pls不是音频流,而是播放列表的描述符。您需要提取FileX密钥,因为这是整个问题所在。不是很有帮助。你能解释一下我们如何使用IP而不是。请?