Skip to content

.ogg file does not playing #22

Description

@aparandiy

i want to play a sound which i receive from server like an urlString(for exapmple: http://xxx.xxxx:xxxx/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg), used this code:

[self.player loadItemWithURL:[NSURL URLWithString:@"http://xxxxxxxxx/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg"] autoPlay:true];

But there is no any sound, player doesn't play it, it works only if i place the file to the project directory and open it from there like:
NSURL *url = [NSBundle.mainBundle URLForResource:@"sampleOggFile" withExtension:@"ogg"];
[self.player loadItemWithURL: url] autoPlay:true];
So, why is it not playing from the server url? only from project directory?
Can some one help me, please?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions