how to play ogg file using blazor wasm - html5-audio

I am using Html 5 audio elementt for playing audio in blazor wasm. audio is playing in google chrome but Ogg format file is not supporting in safari. How to play ogg format file in Safari.
Below is my code.
<div class="player" >
<audio controls controlsList="nodownload" src="#CurrentLesson.AudoFile">
</audio>
</div>

Related

HTML video tag read MOV file as an audio file in Google Chrome

Here is a MOV video file URL which was copied from my iPhone 8.
https://www.yangfamily.tw/attachments/IMG_3049.MOV
Then I tried to play this video on Chrome, the html code like below:
<video width="320" height="240" controls>
<source src="https://www.yangfamily.tw/attachments/IMG_3049.MOV">
Your browser does not support the video tag.
</video>
Ok, it was loaded successfully.
But no frame showed, only the controls displayed.
And then I right clicked the controls, the menu showed that it is an AUDIO file, not a video file.
It's indeed a video file, and I can play this video file and show the frames successfully on any other player.
Why this MOV video file was read as an audio file in Google Chrome? (Chrome Version: 90.0.4430.93 64-bits)
Any idea?
This video is encoded as h.265 HEVC.
ffprobe is a free open source tool (online version: https://ffprobe.a.video/probe?url=https%3A%2F%2Fwww.yangfamily.tw%2Fattachments%2FIMG_3049.MOV)
when I look at the codec:
codec_long_name : H.265 / HEVC (High Efficiency Video Coding)
h265 is only supported in Safari. its a patent/royalty thing. You should re-encode the video as h264 - and serve that version (99.9% browser support).
Chrome CAN play the audio track:
codec_long_name : AAC (Advanced Audio Coding)
so thats why you get audio only in Chrome.
In your <source> tag, you need to add type='video/mp4'
Like this:
<source src="https://www.yangfamily.tw/attachments/IMG_3049.MOV" type='video/mp4'>

Issues playing live stream audio in Chrome and Firefox

I have an MP3 audio stream contained in an .m3u8 file delivered through CloudFront. This is successfully used by apps to play audio, but I'm trying to play this in a browser.
I have tried the basic HTML <audio> tag, and more sophisticated implementations like videojs. In all cases, the audio plays fine in Safari, but will not play in Chrome or Firefox.
Using video.js:
<body>
<video id="my-video" class="video-js" controls preload="auto" width="640" height="264" data-setup='{"liveui": true}'>
<source src="https://d1q1pwal4ma0iv.cloudfront.net/playlist.m3u8" type="application/x-mpegURL"/>
</video>
<script src="https://vjs.zencdn.net/7.7.6/video.js"></script>
</body>
HTML:
<audio
controls src="https://d1q1pwal4ma0iv.cloudfront.net/playlist.m3u8">
Your browser does not support the
<code>audio</code> element.
</audio>
Does anyone have any theories as to what it is about Chrome and Firefox which means it does not play there?
Video.js does not support mp3 in HLS. HLS with acc would work.

.MOV uploads work from iPad but don't from chrome

I am trying to upload .mov files that have been recorded using an iPad but I want to upload them using Chrome on the PC.
The video uploads just fine however on playback all I get is a white screen ( Audio + Play controls also load up fine ).
Alternatively when the video file is uploaded using an iPad and loaded on the PC (chrome again) , the video plays back as intended.
Im using a HTML5 video tag.
<video width="320" height="240" controls>
<source src="files/nameremoved.mov" type="video/mp4">
Your browser does not support the video tag.
</video>
My assumption is that iPad uploads compress the video into something that chrome can playback.
To fix this do I need to convert the .mov uploads that are uploaded using a PC to a chrome friendly format?
You are right, what you would want to do is to upload them as mp4.
There's not supposed native .MOV support on chrome but you can try to add some extension.
Besides you are requesting chrome to play a type="video/mp4" and you are giving it a .mov
<source src="files/nameremoved.mp4" type="video/mp4">

HTML5 play local audio file (c:\classical\chopin.wav) in google chrome

How to play local audio file (c:\classical\chopin.wav - no file selection) in Google Chrome using HTML5 coding?
I'm not on a Windows machine right now. But you should try
<audio src="file:///C:/classical/chopin.wav" controls ></audio>
Of course, this only works, if the webpage is viewed locally on your machine.
Keep your audio file in html folder and this code will work.
<audio controls>
<source src="chopin.wav" type="audio/wav">
Your browser does not support the audio element.
</audio>

html audio tags not working in .php file

This is my code. I am trying to play audio file inside a .php file running it on xaamp server but the audio bar appears but is totally disabled please help
<audio controls>
<source src="ypousaf.mp3" autoplay />
Your browser does not support the audio tag.
</audio>
Mp3 file is supported by IE only.
To play audio files in other browsers you need to convert it in other formats
Here is the list of supported formats by different browsers.
You can find more at http://www.w3schools.com/html/html5_audio.asp
Audio Formats and Browser Support
Currently, there are 3 supported file formats for the element: MP3, Wav, and Ogg:
Browser MP3 Wav Ogg
Internet Explorer YES NO NO
Chrome YES YES YES
Firefox NO
Update: Firefox 21 running on Windows 7, Windows 8, Windows Vista, and Android now supports MP3 YES YES
Safari YES YES NO
Opera NO YES YES
Here is the code i used ...
<!DOCTYPE html>
<html><body>
<audio controls>
<source src="Ellie Goulding - Burn - YouTube.mp3" autoplay />
Your browser does not support the audio tag.
</audio>
<audio controls>
<source src="Ellie Goulding - Burn - YouTube.mp3" type="audio/mpeg" autoplay>
Your browser does not support the audio element.
</audio>
</body>
</html>
Works perfect in both extensions with firefox 29 and the mp3 file is only supported by firefox only.