我试图让用户将请求发送到我的服务器的国家/地区.
到目前为止,我找到了这些解决方案
https://github.com/fiorix/freegeoip
https://github.com/maxmind/GeoIP2-java
这些解决方案正在使用具有许可证的MaxMind数据库GeoIP2国家数据库,对于这个特定项目,我对图书馆有限制(由于业务的法律方面)
我发现一些主题提到Google API可以提供此服务,但这并不让我感兴趣,因为我想要一个我可以自己托管的解决方案,它是使用Java或Kotlin实现的.
有人知道一个与上面提到的解决方案不同的解决方案(在后端运行)吗?
我正在使用AVPlayer播放长音频mp3流音乐(8分钟),短音乐(1到3分钟)播放完美,但随着这些更大的音乐,音乐开始播放,但播放后的一些随机时间(2至3:20之间) )玩家从头开始再次启动赛道.虽然播放器重启音乐,但状态信息(持续时间和当前时间)保持正常计数,无需重启,只需重启音频.有人有想法吗?
我正在播放的文件是:http://storage-new.newjamendo.com/download/track/57864/mp31/
玩家代码:
AVAudioSession *mySession = [AVAudioSession sharedInstance];
// Assign the Playback category to the audio session.
NSError *audioSessionError = nil;
[mySession setCategory: AVAudioSessionCategoryPlayback
error: &audioSessionError];
if (audioSessionError != nil) {
NSLog (@"Error setting audio session category.");
return;
}
// Activate the audio session
[mySession setActive: YES
error: &audioSessionError];
if (audioSessionError != nil) {
NSLog (@"Error activating audio session during initial setup.");
return;
}
player = [AVPlayer playerWithURL:[NSURL URLWithString:url]];
[player play];
Run Code Online (Sandbox Code Playgroud)
以下是我如何跟踪有关正常计数的当前时间的信息.
AVPlayerItem *item = player.currentItem; …Run Code Online (Sandbox Code Playgroud)