Comments (17)
If my memory serves me right, these bleeps might occur when the stream has metadata but are not parsed... Try and see if the request header has a key/value pair of icy-metaint
in it, if that's missing then that's why you hear those bleeps..
The server includes the metadata in the stream but if the header is missing then StreamingKit tries to parse the metadata as audio thus, the bleeps!
from streamingkit.
@dimitris-c icy-metaint seems indeed absent. Had luck with https://github.com/jorgenhenrichsen/SwiftAudio/pull/93/files but unfortunately this is based around AVPlayer.
from streamingkit.
Try setting "0" on the header value in STKHTTPDataSource line 618. See if that makes any difference.
I haven't got a chance to test this on my library AudioStreaming most likely to behave the same though...
from streamingkit.
@dimitris-c Setting "Icy-MetaData" to "0" removes the random bleeps indeed so it seems your memory serves you right :) .
from streamingkit.
So this is a server issue, it should provide the icy-metaint field in the header for the metadata parsing to work!
from streamingkit.
AVPlayer can still parse it though.
from streamingkit.
How do you install the StreamingKit library in your application? Cocoapods is not the latest version.
from streamingkit.
@iDevelopper I copied all the source files located inside StreamingKit/StreamingKit/* in my Xcode project.
from streamingkit.
So, I have not weird bleeps in my applications, one is available on App Store (https://apps.apple.com/fr/app/shout-radios-player/id1231770007). The next one is WIP.
from streamingkit.
@iDevelopper I just tried your app and added: http://23.237.150.98:8512/ to favorite stations. I enabled metadata and also hear bleeps / weird noises every x seconds.
from streamingkit.
Very interesting. I'll take a test!
from streamingkit.
Yes, I also hear those weird noises. It must come from the server, no ?
from streamingkit.
@iDevelopper No, when using: https://github.com/jorgenhenrichsen/SwiftAudio/pull/93/files it plays without noises and shows the metadata. (Based around AVPlayer)
from streamingkit.
StreamingKit looks for the "Icy-metaint" key in the header. However, the header does not have this key but a "icy-metaint" key:
if ([httpHeaders objectForKey:@"Icy-metaint"] != nil)
{
_metadataBytesRead = 0;
_metadataStep = [[httpHeaders objectForKey:@"Icy-metaint"] intValue];
_metadataOffset = _metadataStep;
}
If you try to replace "Icy-metaint" by "icy-metaint", it will work.
from streamingkit.
What I don't understand because with the other stations the header have an "icy-metaint" key also and it works!
from streamingkit.
So what I noticed is that these particular streams have the header data as part of the stream, eg they have Icy Headers. StreamingKit is parsing the data and correctly assigns the values...
What happens is that normal http headers requested by CFHTTPMessageCopyAllHeaderFields
are case-insensitive while the parsing of he Icy header is not, that's why it doesn't work in this case.
Now I need to find time and add parsing Icy headers in AudioStreaming
from streamingkit.
With your brilliant explanations, and reading the documentation for the CFHTTPMessageCopyAllHeaderFields function, now I understand. Thanks a lot for that!
from streamingkit.
Related Issues (20)
- StreamingKit stopped working in iOS. HOT 1
- After seeking, PlayerState becomes "buffering" when a song finished playing. HOT 2
- Can I play MPEG-2 Transport Stream?
- Deadlock with playerMutex
- cannot play .m4a files from remote url HOT 1
- play after seek time
- AUGraphStart crashes on simulator below iOS 14 HOT 1
- the player can't start use the network HOT 3
- didFinishPlayingQueueItemId never called sometimes HOT 3
- Crash HOT 5
- Just a question… HighRes audio
- 可以播放本地文件的音频吗 HOT 1
- Can I sync the StreamingKit player with lock screen player?
- Dose it support pitch ? HOT 1
- DSD Playback? HOT 5
- Very beginning of audio cut off [UPDATED with examples] HOT 2
- Failed to play audio url
- https://github.com/tumtumtum/StreamingKit
- Player cache issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamingkit.