Page 1 of 1

[Extension] Pause @ start

Posted: 28 Jun 2013 15:25
by mederi
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

Re: Pause @ start - a simple extension script

Posted: 01 Jul 2013 04:18
by Peterlangedk
Mederi,
Just what I needed - great!
thanks

Re: [Extension] Pause @ start

Posted: 12 Apr 2017 23:36
by jprokos
I don't understand. Do we copy the script into a text document and then save it with .lua as the extension?

Re: [Extension] Pause @ start

Posted: 13 Apr 2017 12:19
by mederi
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.