Guys, you have ? Or can create such script tha can play a music and videos online by the file url directly?
Guys, you have ? Or can create such script tha can play a music and videos online by the file url directly?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
It mean i can put url of a file in q=:embed-audio/video:
There are many ways to do it. The simplest one is to use the url in a string 'containing' an iframe whose src specifies the url. For instance, if your url is http://www.youtube.com/embed/mlloT_NY8sA?rel=0, the string could look like
If we want to put this in a div, say <div id="video_div"></div>, we can write lines like the following:'<iframe src="http://www.youtube.com/embed/mlloT_NY8sA?rel=0" style="width: 500px; height: 400px"><\/iframe>'
The same technique can be followed for audio-urls.<script>
var video1='<iframe src="http://www.youtube.com/embed/mlloT_NY8sA?rel=0" style="width: 500px; height: 400px"><\/iframe>'
</script>
<div id="video_div"></div>
<a href="javascript: void(0)" onclick="document.getElementById('video_div').innerHTML=video1">play</a>
If we want to make this a bit more sophisticated, we could do:
<script>
function load_video_audio(url,id)
{
document.getElementById(id).innerHTML = '<iframe src="http://www.youtube.com/embed/'+url+'" style="width: 500px; height: 400px"><\/iframe>'
}
</script>
<a href="javascript: void(0)" onclick="load_video_audio('mlloT_NY8sA?rel=0','video_div')">play</a><br>
<div id="video_div"></div>
Debendra Oli (11-28-2013)
Bookmarks