jaredsinclair / sodes-audio-example Goto Github PK
View Code? Open in Web Editor NEWAn example AVAssetResourceLoaderDelegate implementation, with extensive sample code.
License: MIT License
An example AVAssetResourceLoaderDelegate implementation, with extensive sample code.
License: MIT License
Hi @jaredsinclair
Thank you very much for this example as well as your blogpost.
It has been very helpful for me to implement a delegate similar to the one from your sodes example.
However, i do have a problem: The data request ALWAYS ask for the entire length of the file.
Even if the file is several gigabytes long (e.g. 2gb) , and I return that length in then content info request (as well as setting isByteRangeSupported=true). The subsequent call to a data request will be from 0 to 2gb, and if I seek with avplayer then data request will be e.g. 1mb to 2gb that is always to the end of the file. The requestsAllDataToEndOfResource property of dataRequest is always true.
Do you have any idea what I could be doing wrong? I doesn't seem right that I should implement buffering in the delegate...
Cheers,
Morten
Hi @jaredsinclair,
Thanks very much for sharing this project. It's been really helpful for me to learn more about AVFoundation and related things.
I was just wondering, is there any reason this wouldn't also work for playing video? Most of the AVPlayer and AVAssetResourceLoaderDelegate logic should work for both audio and video, shouldn't it? Is there anything I should be aware of if I wanted to do similar things (such as using your Scratch File concept) for playing video?
First of all, great project and thanks for sharing!
I was thinking on implementing a "queue next" feature. I'll think about it and share my notes here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.