Want to request only half of the audio file but not working

i request an audio file from my server and stream it to the browser .. on the browser i make a request to get only half of the audio file stream (i am doing total size of the file / 2 bytes) using the range header in request. the response header is something like this
Content-Range: bytes 0-5510814/11021629;
Content-Range: bytes 0-5510814/11021629;
but in the html <audio /> element i am getting the total duration of the audio as the original length of the file not the half of it i also tried to manipulate the total size of the file in the response header but still it shows the full length but the actual available audio is correct (i.e half of the original audio file)
Aland
Aland352d ago
Why not split the audio file into 2 parts?
fero.xd
fero.xd351d ago
Thats not what i want actually
Huperniketes
Huperniketes351d ago
The server code has to parse and comply with the range spec.
fero.xd
fero.xd351d ago
Didthat
Huperniketes
Huperniketes351d ago
Then hard code the filename and half its duration for the playback. Make sure that works. Start playback at the quarter file mark and play 10 seconds.
Want results from more Discord servers?
Add your server
More Posts
How is realtime DB syncing accomplished without Firestore/Supabase?Hi! I've been working with Firestore for a long time now and gotten very used to the realtime db synDrag and drop library recommendation?Whats the community-favorite option right now? I saw that react-beautiful-dnd isn't being maintainedtRPC invalid_type error with ClerkHi, I have this weird issue I've been trying to resolve for a while now. This is the error in browsSave selected option on dropdownHii, I have a dropdown list that is being made from an array and a Save button. When I click the savEnd-to-end testing tools, SuggestionsHey everyone! 😄 I hope you're all doing well. 👋 I have a couple of questions for you, and I'd reN Nested RelationsHi im having trouble dealing with nested includes. I have a Comment and reply structure and replies A question on procedure design.I would like to know if it is best to try combine procedures or keep them separated. I don't want toMigrating to supabase from create-t3-turboHey guys! I'm migrating a create-t3-turbo app to the supabase create-t3-turbo template, and I'm a biSystem dark mode not detected when using darkMode: "media" in tailwind.config.tsHello! I am building a simple starter project using Tailwind and `shadcn-ui` components. I want the What is wrapping a next server action in startTransition doing?This was brought up in another question. I came up with the following explination, however this is jCan I call tRPC procedure inside another procedure?Something like this: ```js export const mainRouter = createTRPCRouter({ create: privateProcedure Anyone know how to go about using Tailwind Animation to animate a linethrough on hover?Or framer motion.Task scheduler infra?I'm looking for something that can do the following (or do essentially the same thing). It feels likNeed suggestions for better infra CICDalright, so for this project i use docker containers for everything. my compose file has a redis cac