iOS SDK Deezer播放器中的URL无效

时间:2013-08-20 13:37:43

标签: deezer

我从 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"}

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

感谢。

1 个答案:

答案 0 :(得分: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;
        },

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