MultipleMediaPreview

Discuss and share scripts and script files...
Post Reply
serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

MultipleMediaPreview

Post by serendipity »

Made this little script to preview the selected media files. I tested this on .avi and .mp3 files. But I guess if you have windows media player and the right codecs installed then anything playable on IE will work here too.
Here it is:
MultipleMediaPreview.xys
How it works:
Place the script inside XY's script folder, select a bunch of media files and use this script.
Note: as of now this doesn't work from search mode.
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: MultipleMediaPreview

Post by admin »

serendipity wrote:Made this little script to preview the selected media files. I tested this on .avi and .mp3 files. But I guess if you have windows media player and the right codecs installed then anything playable on IE will work here too.
Here it is:
MultipleMediaPreview.xys
How it works:
Place the script inside XY's script folder, select a bunch of media files and use this script.
Note: as of now this doesn't work from search mode.
It works (and is nice!) but has a strange syntax. Heredoc should be used, and the line substr $embed, $embed, 1, -1; can be dumped then:

Code: Select all

...
  $embed=<<<FOO
<TABLE>
   <TR>
     <TD>
      <strong>  #$g_count:  <curname><strong>
     </TD>
  </TR>
  <TR>
     <TD>
         <OBJECT id=VIDEO CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 type=application/x-oleobject width=140 height=140>
            <PARAM NAME=URL VALUE="<curitem>">
            <PARAM NAME=enabled VALUE=True>     
            <PARAM NAME=currentPosition VALUE=0>  
            <PARAM NAME=AutoStart VALUE=False>
            <PARAM name=PlayCount value="3">
            <PARAM name=Volume value=50>
            <PARAM NAME=balance VALUE=0>
            <PARAM NAME=Rate VALUE=1.0>
            <PARAM NAME=Mute VALUE=False>
            <PARAM NAME=fullScreen VALUE=False>
            <PARAM name=uiMode value=full>
        </OBJECT>
     </TD>
  </TR>
</TABLE>
FOO;
  //not needed! substr $embed, $embed, 1, -1;

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: MultipleMediaPreview

Post by serendipity »

admin wrote:It works (and is nice!) but has a strange syntax. Heredoc should be used, and the line substr $embed, $embed, 1, -1; can be dumped then.
Thanks Don. Not familiar with Heredoc, I will see how i can do it.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: MultipleMediaPreview

Post by admin »

serendipity wrote:
admin wrote:It works (and is nice!) but has a strange syntax. Heredoc should be used, and the line substr $embed, $embed, 1, -1; can be dumped then.
Thanks Don. Not familiar with Heredoc, I will see how i can do it.
I showed you in my post. Simply paste my code. :)

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: MultipleMediaPreview

Post by serendipity »

admin wrote:
serendipity wrote:
admin wrote:It works (and is nice!) but has a strange syntax. Heredoc should be used, and the line substr $embed, $embed, 1, -1; can be dumped then.
Thanks Don. Not familiar with Heredoc, I will see how i can do it.
I showed you in my post. Simply paste my code. :)
Sure, thanks for that. But, I like to understand how it works.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: MultipleMediaPreview

Post by serendipity »

An updated version.
Includes suggested changes by Don and an option to preview externally with IE (but will create a file called MultiPreview.html inside XY folder).
Here it is:
MultipleMediaPreview.xys
To see the attached files, you need to log into the forum.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: MultipleMediaPreview

Post by serendipity »

Updated script to include user defined dimensions.
MultipleMediaPreview.xys
To see the attached files, you need to log into the forum.

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: MultipleMediaPreview

Post by kotlmg »

hello sir, bydefault your script is taking windows media player. is it possible to have this preview in system's default media player instead of windows media player? i am using kmplayer as a default media player for my mediafiles. is it possible? ofcourse, double clicking on media file, kmplayer is getting opened.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: MultipleMediaPreview

Post by admin »

kotlmg wrote:hello sir, bydefault your script is taking windows media player. is it possible to have this preview in system's default media player instead of windows media player? i am using kmplayer as a default media player for my mediafiles. is it possible? ofcourse, double clicking on media file, kmplayer is getting opened.
Nope, not possible.

Post Reply