GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
target_seek(3) Arcan Lua API target_seek(3)

target_seek - Request a change playback or presentation position for a frameserver.

nil
target_seek( vid:tgt, number:step )
target_seek( vid:tgt, number:step, bool:relative )
target_seek( vid:tgt, number:step, bool:relative )
target_seek( vid:tgt, number:step, bool:relative, bool:time )
target_seek( vid:tgt, number:step, bool:relative, bool:time=false )
target_seek( vid:tgt, number:step, bool:relative, bool:time=false, number:yaxis )
target_seek( vid:tgt, number:step, bool:relative, bool:time=false, number:yaxis, number:zaxis )

Request an absolute or relative step sized change in active content position in either time or space. Frameservers communicate this capability and the meaning of the ranges through the 'content_state' event. This feature can be used to implement things like scrollbars, as well as client side defined UI 'scaling'. If seeking in time (default), the relative (default) step is expected to be an offset in miliseconds. If setting an absolute time position, the absolute step is floating point in the 0..1 range. If seeking in space (panning) the relative (default) is in a discrete +- steps on a target defined scale. Absolute seeking is a float in the 0..1 range from start (0) to end (1). The sz axis is a hint on magnification where, the absolute value will treat 1 as normal scale, < 1 as minification and > 1 as magnification. The boolean arguments relative and time has constants defined as SEEK_SPACE | SEEK_TIME and SEEK_ABSOLUTE | SEEK_RELATIVE .

function target_seek0()
      vid = launch_avfeed("file=test.mkv", "",
            function(source, status)
                  if status.kind == "resized" then
                        show_image(source)
                        resize_image(source, status.width, status.height)
                  end
            end
      )
      target_seek(vid, 100) -- seek +100ms
end

function target_seek1()
      vid = launch_avfeed("file=test.mkv", "",
            function(source, status)
                  if status.kind == "resized" then
                        show_image(source)
                        resize_image(source, status.width, status.height)
                  end
            end
      )
end
function main_clock_pulse()
      target_seek(vid, 1, SEEK_RELATIVE, SEEK_SPACE, 1) -- dx,dy += 1 every tick
end
end

function target_seek2()
      vid = launch_avfeed("file=test.mkv", "",
            function(source, status)
                  if status.kind == "resized" then
                        show_image(source)
                        resize_image(source, status.width, status.height)
                  end
            end
      )
end
function main_clock_pulse()
      target_seek(vid, 0, SEEK_ABSOLUTE, SEEK_SPACE, 0, math.random(0.1, 3)) -- randomized zoom each tick
end
end

function target_seek0()
      vid = launch_avfeed("file=test.mkv", "",
            function(source, status)
                  if status.kind == "resized" then
                        show_image(source)
                        resize_image(source, status.width, status.height)
                  end
            end
      )
end
      target_seek(BADID)
end
June 2022 targetcontrol

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.