Serving audio files from Web Api Project in IIS7.5 - iis

I have an audio file I'm trying to serve from a directory within a ASP.NET MVC Web Api Project. For some reason the file refuses to play in Safari or mobile browsers. I can use every other browser to play this file.
What's driving me nuts is that if I just create a Virtual Directory and add the file there then navigate to it like /NewSite/song.m4a it will play fine in safari and mobile.
I thought maybe my web.config was screwing something up so I tried creating another Web Api project hosted in IIS and I still cannot play the audio file in Safari or mobile browsers in the new app.
I've done everything I can think of. I have the mime type added to my site. Other browsers like firefox and chrome play the file fine.
Has anyone seen this behavior? I'm going insane here.

I seriously wasted an entire day on this.
My IIS server is using a self signed cert. I was trying to load the audio file through https.
apparently every other browser is cool with this except Safari and mobile browsers.
I changed the src attribute to be http instead of https and safari started working as well as my iOS simulator.

Related

I want to build a web project that consist both mobile and web ui versions

I have noticed in many websites they have both web and mobile version separatly with the same domain name but with different subdomains. For example, web.websitename.com and mobile.websitename.com. I am aware of using media queries in css for showing different ui with the help of css, but how its made on the url. How does the browser finds what type of device it is, like mobile or desktop. If anyone knows please help me.

Static contents stuck in SendResponse after serving a video file

I'm working on an ASP.Net MVC application, running on .Net Framework 4.6.2. The application is currently deployed to a server with IIS 10.
Everything was working fine, until recently, we added some video (mp4) files into the website. Now, whenever staffs from our company browses the website and open up a video, and browse away to another page on the website before the video is completely played, the website no longer loads correctly for that user's browser.
If the video is fully streamed to the browser, then everything works as expected afterwards.
The videos are served with the HTML5 video tag, directly pointing to a physical file on the server, without any other JavaScript library:
<video src="video.mp4" controls controlslist="nodownload" disablepictureinpicture oncontextmenu="return false;" />
Note that the same behaviour happens if we directly browse to the video (browsing the src URL directly).
From IIS, I found that once a video begins to stream to a browser, if the video is not fully streamed before the user browse away, in subsequent requests there will always be a few static content files that will be stuck in SendResponse state. This causes the browser to be unable to render the page normally, giving the impression that the page would not load.
These static content files are all served with Bundling feature in ASP.Net MVC. Note that not all bundles are not able to be loaded, only some, and those are the bigger bundles of the bunch, but not necessarily the largest. Browser will eventually receive an ERR_HTTP2_PROTOCOL_ERROR for each of those static content bundle after a while, in which the items in SendResponse state on the IIS server will go away.
Strangely, incognito mode and non-incognito mode does not seem to affect one another: if user opens up a video and no longer be able to browse any page on the website in incognito mode, they can still browse the site just fine in non-incognito mode, until they browse to a video in the non-incognito mode.
The same behaviour applies to both Chrome and MS Edge in all the PCs we've tested in our company.
However, the same does not occur to our mobile devices, or our own devices at home.
Failed Request Tracing shows no error. Everything is returning code 200. Filtering the trace to code 400 and above tracked nothing.
I'm at a loss what other methods should I use to continue troubleshooting. Any pointer is greatly appreciated.
After some investigations and trial and errors, it was finally found that the culprit is the antivirus software. A ticket was submitted to the antivirus software company, and they acknowledged that it was their issue and released a hotfix.
Applying the hotfix resolved the problem.

Azure Media Player in Blazor

I was trying to get the Azure Media Player running in Blazor - no success.
Everything works fine in an Asp.net core project.
In Blazor its always the normal Html player.
Tried it with diffrent browsers - always the same.
It must have something to do with the js not get loaded correctly.
Does anybody has an idea?
Here is an example where i put the script and style:
https://blazorfiddle.com/s/bhos6ocq
try to use the HLS(v4) url with m3u8 format, then use this library to display it with the html video tag : https://github.com/video-dev/hls.js

html5: audio doesn't work with apache on my wamp server

I downloaded able player, an accessible cross browser audio and video player from https://ableplayer.github.io/ableplayer/
Before downloading, I played some examples from github pages to see it in action with my screen reader. It works very fine, with internet explorer 11, google chrome and firefox.
So, i downloaded it and copied it in my localhost server. I use wamp server, apache, php and mysql.
Before playing from my localhost, I added on my .htaccess in root folder, all AddType directives suggested by able player github page.
When I try to play examples in demo folder, with internet explorer, my screen reader doesn't see audio player region and I can't play anything.
With google chrome, I can play, but I can't see playlist elements managed by able player.
So, I tried to make my own audio player without using ableplayer, without css, simple html5.
Now, I tried to play it with and without apache.
By opening index.html with internet explore, it sees audio region and play mp3.
If I point to localhost, where I put index.html, I can't see anything.
So I believe apache is the problem, but in apache log I can't see any error.
Does Some one has a suggestion? Something to modify in my .htaccess?
Thanks!
I solved! Definitively was apache. I downloaded an .htaccess from github that works fine. Now I can play audio and video.

node http2 and safari

I am well into building an single page application using nodejs and the http2 module. The client end is using Polymer and is a progressive web app, with a fairly minimal index.html. I have been doing most of the development in chrome, and am reasonably happy, since this is an intranet application and I can dictate the brower.
I would like to support the ipad, albeit perhaps at lesser performance. I have to borrow my wife's if want to try anything, and I couldn't get it to work at all. I do have a mac laptop and tried accessing my (in development) site using safari on that (I also have chrome on it and that works fine). With Safari it doesn't get anywhere. In fact with the web inspector open it doesn't even appear to have loaded the basic index.html file.
I am assuming that safari doesn't support http2. I am not sure what I should do about it through. How do you gracefully fall back to something else?
Safari does support http/2. Test your site at https://www.ssllabs.com/ssltest/ and see if you've a cipher config that safari supports.

Resources