[Extension] Pause @ start

Discuss your Lua playlist, album art and interface scripts.
mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

[Extension] Pause @ start

Postby mederi » 28 Jun 2013 15:25

A simple Lua extension script for following feature request: viewtopic.php?f=7&t=111913

Code: Select all

-- pause@start.lua -- VLC Extension function descriptor() return { title = "Pause @ start", version = "1.0", capabilities = {"input-listener"} } end function activate() end function deactivate() end function input_changed() state = vlc.var.get(vlc.object.input(), "state") -- vlc.msg.info("["..descriptor().title.."] Input state = "..state) if state~=4 then vlc.playlist.pause() end end function meta_changed() end

Peterlangedk
New Cone
New Cone
Posts: 3
Joined: 26 Jun 2013 17:53

Re: Pause @ start - a simple extension script

Postby Peterlangedk » 01 Jul 2013 04:18

Mederi,
Just what I needed - great!
thanks

jprokos
New Cone
New Cone
Posts: 7
Joined: 13 Dec 2015 16:43

Re: [Extension] Pause @ start

Postby jprokos » 12 Apr 2017 23:36

I don't understand. Do we copy the script into a text document and then save it with .lua as the extension?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: [Extension] Pause @ start

Postby mederi » 13 Apr 2017 12:19

Yes, save the code (select>copy>paste) as a simple text file and use the "lua" extension instead of "txt" (Notepad: File > Save As > Filename [pause.lua], Save as type [All files] >>> in \lua\extensions\ folder).
Now you can try VLC 3 that already has the "start paused" built-in feature.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 21 guests