Azure Media Player in Blazor - azure

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

Related

How to embed azure media services live stream to a personal website

I have created a simple live stream using Azure Media Services. I can view it from Azure Media Player but I want to be able to embed the video to my personal website using the <Video></Video> HTML tag. I've been looking for a solution but I can't seem to find one. Is this even possible?
The HTML5 tag does not always support playback of HLS or DASH depending on the platform you are on.
https://caniuse.com/?search=hls
https://caniuse.com/?search=dash
Sounds like you are trying to playback HLS or DASH from Azure Media Services with just an HTML5 video tag and no javascript player framework. That won't work in most browsers.
Review https://howvideo.works/ for background on how HLS and DASH actually work in the browser - and the reason that you need access to a javascript library and the Media Source Extension feature of HTML5 (not always available in all browsers - see https://caniuse.com/mediasource)

Dash.js player doesn't play when debug

I've embedded dash.js player into Multi Device Hybrid App template, feed it with working live video link (tested with the same dash.js in trivial html page). When app is starting in Ripple (Apache Rippleā„¢, web based mobile environment simulator), I see debug info in VS with errors "net::ERR_CONNECTION_REFUSED". After a few attempts it stops to try and doesn't play a thing.
However, to check if network is working between client and server I've created a website with test image on the server side and embedded this image into application on the client side. It manages to load it, so at least network is working. Firewall disabled both sides.
So, the same exact MPEG DASH manifest is working inside an html with embedded dash.js in Chrome browser, but doesn't work when in Hybrid App in Ripple. But remote image can be loaded inside that app, so network is fine and Ripple let the app to request remote resources from the net.
What the reason? How can I debug it?
Is the HTML5 MSE (Media Source Extentions) supported within Ripple? You may also try it with some basic sample code like this or this, or try another DASH web player like dash-js or bitdash

Serving audio files from Web Api Project in IIS7.5

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.

Video playing issue in windows azure web site

This is the first time I am working with Azure website. I have successfully deployed my website into Azure website cloud hosting space. Everything is working pretty fine, and as desired. But I am facing issues in my video page. Am providing 2 urls, hosted in the same location.
http://masan.azurewebsites.net/video/demo.html
http://masan.azurewebsites.net/video/demo1.html
First video is playing (.mp4), after adding the necessary mimeMap tag in my web.configfile. First demo.html contains a video being called from an external url.
Second video in demo1.html (.mp4) contain video hosted in the same server as the page, which is not playing.
Could somebody please guide me, what should I do to make my second page to also start playing the .mp4 video
Thank you
Sorry to bother you all, there was no issue only, since the video in demo1.html was of wrong format, it was not playing.
So the answer to the above is: Just need to add the mimeMap tag in web.config, will work seamlessly. Thank you.

How can I use a UIWebview to load content from a asp.net website dynamically loading .mp4 video and get the video to play?

I have a client that has a website. The website current allows users to login and search for and play .mp4 video. The list of playlist is created dynamically where values are stored in a sql server 2008 database. My client's site is already built for smartphone utilization and did not want to recreate an iphone app. Besides it would mean loading thousands of video. Instead I thought I would use the UIWebview to load the website. This seemed to work well. However, when you try to click on and play video within the UIWebview nothing happens. This is not the case if we launch the mobile website within the apple mobile safari browser. The vide plays by kicking off in the iPhone video player. Is there any way to accomplish this same functionality with a uiwebview? Any guidance or help is appreciated.
UIWebView will play video using <video> if everything is set up correctly, either remote files or local files will work (if they are the correct format).
What does your video tag look like? In particular your src.
If you want to, for example, play an inline video the html5 for that would be something like
<video id="theVideo" controls width="280" height="160" src="yourVideo.mp4" webkit-playsinline></video>
And it would be necessary in the UIWebView to set this line
self.webView.allowsInlineMediaPlayback = YES;
Or you can also explicitly load the media player, but doing everything in HTML5 is neat and tidy and easy.

Resources