user25
user25

Reputation: 3195

Open Youtube links in external videoplayer from browser

I use videoplayer "PotPlayer". Player can play video from youtube. For e.g. player can start play youtube video if you run player as:

"C:\PotPlayer\PotPlayer.exe https://www.youtube.com/watch?v=*******"

I added URI Scheme to registry with name "potplayer":

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\potplayer]
@="\"URL:potplayer protocol\""
"URL Protocol"=""

[HKEY_CLASSES_ROOT\potplayer\shell]

[HKEY_CLASSES_ROOT\potplayer\shell\open]

[HKEY_CLASSES_ROOT\potplayer\shell\open\command]
@="c:\\potplayer\\potplayer.exe"

And I try open youtube videos in PotPlayer from web-browsers using next link:

potplayer://https://www.youtube.com/watch?v=*******

But it just only start Player without transfer the link to player (".../PotPlayer.exe https://www.youtube.com/watch?v=*******").

How can I transfer the link to PotPlayer using URI Scheme? What I need to change in the registry code?

Upvotes: 0

Views: 5370

Answers (2)

Aliday K
Aliday K

Reputation: 160

Modern potplayer version compatible:

[HKEY_CLASSES_ROOT\potplayer\shell\open\command] @="cmd /c ( set \"var=%1\" & set \"var=%%var:~12%%\" & start \"\" \"C:\Program Files\DAUM\PotPlayer\PotPlayerMini64.exe\" \"%var%\")"

Upvotes: 0

user25
user25

Reputation: 3195

I found the way from CMD / Batch / Registry - String replace not working as expected?

So:

[HKEY_CLASSES_ROOT\potplayer\shell\open\command]
@="cmd /k ( set \"var=%1\" & call set var=%%var:potplayer://=%% & call C:\\PotPlayer\\PotPlayer.exe %%var%%)"

Upvotes: 1

Related Questions