Auto play media files

General discussion related to "Everything".
Post Reply
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Auto play media files

Post by ravishi »

Hi, first of all, congratulations and thank you for this great piece of software. I don't know how I'd work without it.
Is there an option for automatically previewing media files in the Preview pane?

I use Everything to browse my sound effects and it would be fantastic if the file would start playing when selected. Currently, I need to hit Ctrl+P on each file.

(Great columns for audio in 1.5a! Thanks for the work.)

Have a marvellous day, Everyone!
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Auto play media files

Post by void »

Thank you for your feedback ravishi,

Everything uses the system to render previews.

Third party preview handlers can be installed.

Does anyone know of a preview handler that auto-plays?
If so, please post it here.



If you are using Everything 1.5, please check out the winmm (Windows Multimedia) ini setting.

When enabled, Everything will audio play the selected media file.

To enable winmm:
  • In Everything, type in the following search and press ENTER:
    /winmm=1
  • If successful, winmm=1 is shown in the status bar for a few seconds.

To disable winmm:
  • In Everything, type in the following search and press ENTER:
    /winmm=0
  • If successful, winmm=0 is shown in the status bar for a few seconds.
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Auto play media files

Post by horst.epp »

That depends on your installed preview handlers.
I have assigned the .wav to "Windows Media Player Rich Preview Handler".
Preview in Everything (Alt-P) shows the player and I can press the play button.
Using the setting /winmm=1 is not very usable as it starts playing just when the cursor is the the results on a media file.
It should only play if the preview pane is shown.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Auto play media files

Post by harryray2 »

Is there a way to play video (mp4) files in preview?
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Re: Auto play media files

Post by ravishi »

horst.epp wrote: Sat May 21, 2022 11:51 am Using the setting /winmm=1 is not very usable as it starts playing just when the cursor is the the results on a media file.
It should only play if the preview pane is shown.
A shortcut key combination for toggling /winmm on/off would be great for this.
Or a button bar? :geek:
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Auto play media files

Post by horst.epp »

ravishi wrote: Sat May 21, 2022 1:08 pm
horst.epp wrote: Sat May 21, 2022 11:51 am Using the setting /winmm=1 is not very usable as it starts playing just when the cursor is the the results on a media file.
It should only play if the preview pane is shown.
A shortcut key combination for toggling /winmm on/off would be great for this.
Or a button bar? :geek:
Why complicated ?
It would be enough if it plays only when preview is on.
So if winmm is set you can use the hotkey (Alt-P) to toggle preview.
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Re: Auto play media files

Post by ravishi »

horst.epp wrote: Sat May 21, 2022 11:51 am
Why complicated ?
It would be enough if it plays only when preview is on.
So if winmm is set you can use the hotkey (Alt-P) to toggle preview.
True. True. Please add this, My Void ;)
Thank you!
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Re: Auto play media files

Post by ravishi »

horst.epp wrote: Sat May 21, 2022 11:51 am Why complicated ?
It would be enough if it plays only when preview is on.
So if winmm is set you can use the hotkey (Alt-P) to toggle preview.
But the idea would be that it plays in the preview pane, with the progress bar of the player...
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Auto play media files

Post by horst.epp »

ravishi wrote: Sat May 21, 2022 4:00 pm ...
But the idea would be that it plays in the preview pane, with the progress bar of the player...
That is what it does for me with the Windows Media Player Rich Preview Handler.
It just doesn't auto-play so I have to press the play button in the preview.
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Re: Auto play media files

Post by ravishi »

horst.epp wrote: Sat May 21, 2022 4:33 pm
ravishi wrote: Sat May 21, 2022 4:00 pm ...
But the idea would be that it plays in the preview pane, with the progress bar of the player...
That is what it does for me with the Windows Media Player Rich Preview Handler.
It just doesn't auto-play so I have to press the play button in the preview.
Mine is also like this, by default.
How can one install another preview handler?

(My Void was a ...typo, I meant Mr Void)
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Auto play media files

Post by horst.epp »

ravishi wrote: Sat May 21, 2022 4:49 pm ...
Mine is also like this, by default.
How can one install another preview handler?
Preview handlers come normaly as part of other software like Office or as part of Windows.
I use the PreviewHandlerEditor to assign extensions on the fly.
But the problem is to found preview handlers for certain formats and also for free.

I have no such problem in my File manager (Total commander)
as here the preview has auto-play for almost any formats.
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Auto play media files

Post by vsub »

Just a quick AutoHotkey script that seems to work

Code: Select all

#IfWinActive,AHK_class EVERYTHING
~LButton::
Keywait,LButton
MousegetPos,,,,Ctr
If Ctr != SysListView321
Return
StatusBarGetText,Text,,A
If (Text2 = Text)
Return
IfInString,Text,objects
Return
Sleep,1000
StatusBarGetText,Text2,,A
ControlGetPos,X,Y,w,h,AtlAxWin1,A
If X =
Return
ControlClick,% "x" X + (W / 2) A_Space "y" (Y + H)-15,A
Return
If the preview handler don't appear in 1 second after you release the mouse button,you will need to adjust the Sleep time(works fine here)

Btw void,I am using wmp activex that to run media files.Here is a tinny part of the code that may give you some ideas

Code: Select all

Gui,P:Add, ActiveX,X0 Y0 w320 h272 vAV , WMPLayer.OCX
AV.stretchToFit := true
AV.settings.volume := 100
AV.Settings.setMode("loop" ,true)
AV.Url := Path
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Auto play media files

Post by void »

It should only play if the preview pane is shown.
I will consider an option to do this.
For now, winmm plays the audio only for media files.

For the best experience, I would recommend using the preview handler to play your media files.
Unfortunately, Everything doesn't have control over auto-playing previews.
It is up to the preview handler.


Is there a way to play video (mp4) files in preview?
Windows supports mp4 previews out of the box.
Maybe you have installed a media player that disables this preview handler?

To use Windows media player to preview mp4 files:
In the registry editor, navigate to:
HKEY_CLASSES_ROOT\.mp4\ShellEx
Create a new key:
{8895b1c6-b41f-4c1c-a562-0d564250836f}
In this new key, set the (Default) data to:
{031EE060-67BC-460d-8847-E4A7C5E45A27}

-or-

Install a third party preview handler that supports mp4.


A shortcut key combination for toggling /winmm on/off would be great for this.
Or a button bar?
To create a bookmark to toggle winmm in Everything 1.5:
  • In Everything 1.5, from the Bookmarks menu, click Add to bookmarks....
  • Change the Name to:
    Toggle winmm
  • Change the Search to:
    /winmm=!
  • Optionally set a keyboard shortcut.
  • Click OK.
This currently does not start playing the selected file.
You will need to change the selection after toggling winmm to auto play.

The next alpha update will auto play the selected file when toggling winmm.


Why complicated ?
It would be enough if it plays only when preview is on.
So if winmm is set you can use the hotkey (Alt-P) to toggle preview.
There is no visual output with winmm.
winmm is designed to be used without the preview pane.

I highly recommend installing a third party preview handler with auto play over using winmm.

That said, I will consider an ini setting to only auto play media files with winmm when the preview pane is shown.

Thank you for the suggestions.
ravishi
Posts: 11
Joined: Sat May 21, 2022 10:36 am

Re: Auto play media files

Post by ravishi »

vsub wrote: Sat May 21, 2022 6:51 pm Just a quick AutoHotkey script that seems to work

Code: Select all

#IfWinActive,AHK_class EVERYTHING
~LButton::
Keywait,LButton
MousegetPos,,,,Ctr
If Ctr != SysListView321
Return
StatusBarGetText,Text,,A
If (Text2 = Text)
Return
IfInString,Text,objects
Return
Sleep,1000
StatusBarGetText,Text2,,A
ControlGetPos,X,Y,w,h,AtlAxWin1,A
If X =
Return
ControlClick,% "x" X + (W / 2) A_Space "y" (Y + H)-15,A
Return
Thank you, vsub, it works great!

void wrote: Sun May 22, 2022 1:20 am To create a bookmark to toggle winmm in Everything 1.5:

In Everything 1.5, from the Bookmarks menu, click Add to bookmarks....
Change the Name to:
Toggle winmm
Change the Search to:
/winmm=!
Optionally set a keyboard shortcut.
Click OK.

This currently does not start playing the selected file.
You will need to change the selection after toggling winmm to auto play.

The next alpha update will auto play the selected file when toggling winmm.
Thank you, void!
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Auto play media files

Post by void »

Everything 1.5.0.1315a will now play the selected file when winmm is enabled.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Auto play media files

Post by void »

I have put on my TODO list to add an option to specify the window position for videos played with winmm/mciSendString.
Post Reply