Results 1 to 4 of 4

Thread: Looking for Videos and Music Player script through url method !!

  1. #1
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Looking for Videos and Music Player script through url method !!

    Guys, you have ? Or can create such script tha can play a music and videos online by the file url directly?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    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

  3. #3
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    It mean i can put url of a file in q=:embed-audio/video:

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,371
    Thanks
    31
    Thanked 141 Times in 136 Posts
    Blog Entries
    32

    Default

    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
    '<iframe src="http://www.youtube.com/embed/mlloT_NY8sA?rel=0" style="width: 500px; height: 400px"><\/iframe>'
    If we want to put this in a div, say <div id="video_div"></div>, we can write lines like the following:
    <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>
    The same technique can be followed for audio-urls.

    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>

  5. The Following User Says Thank You to molendijk For This Useful Post:

    Debendra Oli (11-28-2013)

Similar Threads

  1. Replies: 5
    Last Post: 03-16-2007, 03:24 PM
  2. Anyone Have A Music Player Like This...
    By tomyknoker in forum Flash
    Replies: 2
    Last Post: 09-28-2006, 03:44 PM
  3. music player in FF?
    By SaishuHane in forum HTML
    Replies: 2
    Last Post: 08-22-2006, 06:43 PM
  4. music videos
    By brightpinkstarz in forum HTML
    Replies: 6
    Last Post: 01-24-2006, 03:29 PM
  5. shuffle music videos
    By cruelneo in forum HTML
    Replies: 0
    Last Post: 09-21-2005, 01:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •