0

我对来自Deezer的iOS SDK有疑问。我初始化与 Deezer 的连接:

_deez = [[DeezerConnect alloc] initWithAppId:kDeezerAppId andDelegate:self];

// List of permissions available from the Deezer SDK web site */
NSMutableArray* permissionsArray = [NSMutableArray arrayWithObjects:@"basic_access", @"offline_access", @"manage_library", @"delete_library", nil];

[_deez authorize:permissionsArray];

登录成功。登录后我想初始化一个我使用的播放器:

 _player = [PlayerFactory createPlayer];
[_player setPlayerDelegate:self];
[_player setBufferDelegate:self];
 [_player preparePlayerForTrackWithDeezerId:trackid
                                    stream:stream
                          andDeezerConnect:_deez];

我进入了bufferDidFailWithError:

Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x194370a0 {NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x190894f0 "unsupported URL"}

也许问题出在流中。那是什么?

谢谢。

4

1 回答 1

1

如果您尝试收听专辑或播放列表,您是否检查每个轨道对象收到的“可读”值?

为轨道收到的 JSON 示例:

    tracks =     {
         data =         (
                    {
            artist =                 {
                id = 1234;
                name = toto;
            };
            duration = 1;
            id = 6789;
            link = "";
            preview = "";
            rank = 1;
            readable = 0;
            stream = 0;
            title = Title;
            type = track;
        },

如果“可读”和“流”都等于 false,则无法读取该曲目。

于 2013-08-21T16:12:05.510 回答