swift - ios9 / swift2 / xcode7+ AVplayer icecast doesn't process streaming without file extension -
how play stream icecast2 not have file extension example stream url: http://icecast:8044/channel-123?a=hash format: mp4a the code seems working on files extension, not on files without. var player = avplayer(); let playeritem = avplayeritem(url:nsurl(string:"http://host/file.mp4a")!); player = avplayer(playeritem:playeritem) let playercontroller = avplayerviewcontroller() playercontroller.view.frame = self.view.frame playercontroller.player = player self.addchildviewcontroller(playercontroller) self.view.addsubview(playercontroller.view) player.play() edit: when stream address ends without file extension (the file on server stored without file extension .mp3, .mp4,..) avplayer not play anything( http://example.com/file ) ... if file name contains file extension works ( http://example.com/file.mp3 ) it seems confusing live streaming , loading media files server. if talking live streaming: 1) file extension has no i...