Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

Not able to seek in audio tag when i play mp3 using mvc web api service

$
0
0

I have created service to return mp3 file like below.

public ActionResult GetMP3()
{
    byte[] bytArray = System.IO.File.ReadAllBytes(Server.MapPath("~/App_Data/05_-_W.T.P..mp3"));
    return File(bytArray, System.Net.Mime.MediaTypeNames.Application.Octet, "download.mp3");
}

and playing that using audio tag like below.

<audio controls >
    <source src="https://localhost:44355/Home/GetMP3" type="audio/mp3" />
</audio>

and it is working fine audio file is playing as expected but i am not able to seek the audio, whenever i try to seek the audio it starts from beginning, can someone please explain this behavior ? and also what should i do to seek using this approach ? thanks in advanced.


Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>