I've got a my own website and I've put on my website a radio interview (MP3 file). On my website there is a tool which takes the MP3 file and plays it.
My file URL is "http://www.abc.com/invterview/July 9 interview.MP3"
Now, another website wants to play the same file and asks me to give te embed/share link.
Can someone help me how to accomplish this link?
I googled and found this webpage http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-websites/2232/ ,which explains how to accomplish an EMBED, but I've never done this and I know Chrome, IE, FF, Safari have it's own instructions...
So can someone guide me how to accomplish an EMBED URL so it will work on all Browser?
Do I need to use or what is the common use??????
if it was video file I could upload it to Youtube and send that link, but this is a MP3 file.
thanks
You could use HTML5, which has native support for playing audio.
<audio controls="controls" height="100" width="100">
<source src="song.mp3" type="audio/mp3" />
<source src="song.ogg" type="audio/ogg" />
<embed height="100" width="100" src="song.mp3" />
</audio>
If a browser does not support HTML5, the code above will fallback to the embed code.
Other than that, you could use the yahoo media player. It's not the coolest or best around, but it's simple and it gets the job done.
Play Song
<script type="text/javascript" src="http://mediaplayer.yahoo.com/js">
</script>
Related
I'm currently facing an issue with AMP-audio.
When i open the page that has an mp3 file it works for the first 5 mints and then it go to the end of the mp3 file directly.
i'm wondering, is there any thing that i can do to prevent that, or this is a network issue?
my code is like this
<amp-audio width="auto"
height="50"
src="1.mp3"
preload="auto"
autoplay
controlsList="nodownload">
<div fallback>
<p>Your browser doesn’t support HTML5 audio</p>
</div>
</amp-audio>
Thanks in advance .
I'm working on WordPress site, and have programmatically integrated Video.js player in it. The screen is black and i can hear the audios. Most probably, it's due of bandwidth (as shown in screenshot attached).
Sometimes i'm able to watch videos, but most of the times, its black screen.
How to fix this issue. My code is as:
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js/dist/video.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
</head>
<body>
<?php
$var_value = $_GET['video_id'];
?>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" data-setup='{}'>
<source src="https://d3eykkkvwlu40v.cloudfront.net/v2/hls/<?php echo $var_value?>/<?php echo $var_value?>.m3u8" type="application/x-mpegURL">
</video>
<script src="http://static.jsbin.com/js/render/edit.js?4.0.4"></script>
Please guide. Thanks.
The Media Source Extension (MSE) in browsers don't support that you dynamically switch between an audio/video and an audio-only stream or vice versa. So if the player starts with the audio-only variant it won't be able to switch up at all or just plays the audio of that variant.
Theoretically it would be possible for a player to switch between those variants by re-initializing the MSE for every such switch. But I don't know if any player supporting this, for good reasons:
the switch would not be completely seamless
the buffered data would be deleted by the browser
This would be a bad user experience.
So I think there are three options: live with it, remove the audio-only variant or find/build a player that supports this. I'd go for the removal.
Hey guys I am trying to play a .swf file on my web page I have already tried to embed it using HTML and it works. But is there anyway of playing a .swf file after button click event in asp.net?
Before you get to carried away with using flash could I urge you to read this http://occupyflash.org/ and then invest a little of your time researching html5 (specifically canvas) :)... http://www.williammalone.com/articles/flash-vs-html5-canvas-drawing/ and this http://webdesign.about.com/od/html5tutorials/a/canvas-vs-svg-vs-flash.htm will give you a good start.
Edit
Without seeing your current code I can't give a precise answer but this should work:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<video src='insert-route-to.swf' id='insert-id-here' controls>
Your browser does not support HTML5 videos please Upgrade.
</video>
<button onclick="document.getElementById('insert-id-here').play()">Play</button>
<button onclick="document.getElementById('insert-id-here').pause()">Pause</button>
</body>
</html>
on button click
Response.redirect("file path");
something like:
Response.redirect("Video/abc.swf");
where "Video" is folder name which is present in project folder and "abc" is file name.
I'm using Cordova 3.0 and am trying to embed a YouTube video inside an article of my news app. The YouTube code looks like this:
<iframe width="600" height="450" src="//www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
In its current form the code does nothing except leave a large wide white square in the DOM. When I inject the letters http: so that it looks like this:
<iframe width="600" height="450" src="http://www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
then the app automatically quits and goes to the browser. How can I just make the iframe behave as it should, as a little window. I have followed the steps mentioned in this question and have tried fiddling with the <preference name="stay-in-webview" value="false" /> line in the config.xml file.
Is this what you are looking for
Force HTML5 youtube video
<iframe src="http://www.youtube.com/embed/_OBlgSz8sSM?html5=1"></iframe>
OR may be
Show Youtube video source into HTML5 video tag?
Step 1: add &html5=True to your favorite youtube url
Step 2: Find tag in source
Step 3: Add controls="controls" to video tag:
<video controls="controls"
class="video-stream"
x-webkit-airplay="allow"
data-youtube-id="N9oxmRT2YWw"
src="http://v20.lscache8.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPRVRMVV9FSkNOOV9MRllD&itag=43&ipbits=0&signature=D2BCBE2F115E68C5FF97673F1D797F3C3E3BFB99.59252109C7D2B995A8D51A461FF9A6264879948E&sver=3&ratebypass=yes&expire=1300417200&key=yt1&ip=0.0.0.0&id=37da319914f6616c"></video>
More SF posts:
YouTube video in HTML5
Force HTML5 youtube video
I am trying to add HTML5 audio control to my page. Here's the code:
<audio src="../../Content/BattleNet_MusicLoop.ogg"
controls="controls" autoplay="autoplay" loop="loop">
Your browser does not support the new HTML5 audio element.
</audio>
When I click debug, I can see the audio player for about a second and then it turns dark gret with light "x" icon in the middle. I clicked on "Copy Audio Source" and the source seems to be correct. Browser is not the issue because it's a Firefox 4.0 Beta 1. It plays this exact HTML5 audio player fine on http://www.w3schools.com/html5/tag_audio.asp. That's where I got it from by the way.
I am using Visual Studio 2010 HTML5 add-in by Mikhail Arkhipov. My project is based on ASP.NET MVC 2 and .NET Framework 3.5
Any ideas what could be causing this issue?
You have to upload the song to a server, for some reason firefox can't play the song if it's on the localhost, try to upload the file to some host like toofiles and get the url and use it as src
example:
<audio autoplay="autoplay" controls="controls" >
<source src="http://dl.toofiles.com/vaaoje/audios/rooster.ogg" type="audio/ogg" />
<source src="http://dl.toofiles.com/vaaoje/audios/rooster.mp3" type="audio/mpeg"/>
</audio>
the ogg file is for firefox and the mp3 file for chrome and IE.
Did you try to replace
"../../Content/BattleNet_MusicLoop.ogg"
with
'<%= Url.Content("~/Content/BattleNet_MusicLoop.ogg") %>'
?
Try it in chrome, it should work.
I had the very same issue with firefox.
what DTD your page declares?