Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: moving options from one select list to another.

  1. #21
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I thought I did something to the HTML. Yeah I do need to clean up the comments. I kinda when overboard. I thought I had changed the id but I was changing the names.

    I fixed that but IE is giving me an error when I try and play it. It says ctr is not defined.
    Last edited by riptide; 09-27-2010 at 11:56 PM.

  2. #22
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by riptide View Post
    IE is giving me an error when I try and play it. It says ctr is not defined.
    It's not. Try:

    Code:
    function playSongs(){
      var arr, len;
      var sel = document.forms[0].sel3;
      var defaultLen = 310; //6 mins
      if (playSongs.ctr<sel.options.length){
        arr = sel.options[playSongs.ctr].value.split("|");
        if (arr.length>0 && arr[0]){
           len = (Number(arr[1]))? Number(arr[1])*1000:defaultLen*1000; //in milliseconds       
           document.getElementById('music1').innerHTML='<object width="500" height="450" id="Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"><param name="URL" value="'+arr[0]+'"><param name="autoStart" VALUE="true"><param name="uiMode" value="full"><param name="currentPosition" vaule="1" ><param name="ShowStatusBar" value="true"  ><embed type="application/x-mplayer2" src="'+arr[0]+'" ShowControls="0" width="300" height="300"></embed></object>';
        }
        playSongs.ctr++;
        setTimeout(playSongs);
      }
    }
    
    playSongs.ctr = 0;
    and later:

    Code:
    <input type="button" value="Play" onclick="playSongs.ctr = 0; playSongs()" />
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    riptide (09-30-2010)

  4. #23
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    hum...I'm guessing that had something to do with moving moving the global ct. I have no idea why it went all buggy because of something like that. the player works but it's not working with my local files. It won't play avi's how strange...I WMP works when I click on the file.

    well it's probably windows being windows.

    thanks for all the help.

  5. #24
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I was going to get around to that. Whether for the web or the local machine, though it can be harder to set up, Flash is the preferred method for all multimedia content in the browser. With .avi you may have to convert it to .flv or .mp4 first unless you can find a Flash .swf that can support it. But FLV is a better format (smaller fies) for the web anyway.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #25
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    is that about the avi's not working or just my choice of files. I tried using flash but I can't find any flash player that would play avi's based on flash 8 or MX. As for converting the files I don't know if I really want to do that, I still would need an old video player. Plus what if flash is turned off?

  7. #26
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sorry to take so long getting back to you. Flash is preferred for that very reason. It has the largest installed and active base on the web. As for avi and media player, you are immediately limited to Windows. The versions vary and support in other browsers, other than IE, even in Windows is limited. Conversion programs abound. At least several high quality free ones are available. Some with a GUI, some are command line only. I like WinFF:

    http://winff.org/html_new/

    Features:
    • Easy to use interface.
    • Fast (Winff does not hinder FFmpeg in anyway).
    • High quality output.
    • Converts multiple different files all to the same format at once.
    • Convert video to audio.
    • Convert between audio formats.
    • No external codecs needed.
    • Includes a variety of preset conversion settings for common formats and devices.
    • Preset conversions can be created to encode to any format FFmpeg supports.
    • Easy access to common conversion options such as bitrate, frame size, frame rate.
    • Specify additional command line parameters for advanced users (options button).
    • Easily change FFmpeg versions.
    • Supports FFmpeg's multi threading for dual core processors
    • Multilingual, available in over 10 languages


    There are Flash objects readily available to play your flv or mp4 (if you even need video, I still recommend flv, as it's so much more efficient). But, as I recall, you don't even need video, your clips appear to be audio only. In which case you could use mp3 and the standalone Wordpress audio player:

    http://wpaudioplayer.com/standalone
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #27
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Most of them are going to be video. don't flash and quicktime play avi's?

    also I got the avi's to play but the script won't play the first file no matter what it is. also the timer doesn't work. I think it has something to do with playSong.ctr.

    I'll go look at the other versions of playsong in DD because I deleted my old script.
    Last edited by riptide; 10-20-2010 at 10:15 PM.

  9. #28
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you have true avi video, convert to .flv format and use Flash. Everything else I said is similar with video. The .flv format is much, much more efficient (byte wise) than .avi format. There are many, many ready made Flash methods for displaying .flv files (use flowplayer or Google to find others). With some of these (including flowplayer) you may also stream, which is great for larger video files.

    http://flowplayer.org/
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #29
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    I have flower player but I had some sort of issues installing it. I originally thought flower player played any type of files. it would be nice to have a flash 8 based player that can play many types of files.

    I really don't want to convert the avi files because I'll have two copies and the avi's I use on my computer. I guess I could convert it but I'am worried about the quality for some of the videos.


    I've got the function playSongs working by adding [setTimeout("playSongs()",len)]

    the function was ignoring the timer. Anyway the last object plays forever but I'm not mad about it at least it's working.
    Last edited by riptide; 10-21-2010 at 11:24 AM. Reason: edited code

  11. #30
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try again with flowplayer. If you still have problems, give a link to the problem page. With flowplayer you can have communication back and forth between the player and javascript for more precise timing/switching videos.

    Here's Super©, another, probably a better conversion program:

    http://www.erightsoft.com/SUPER.html
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Tags for this Thread

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
  •