VideoKit for VS CodeVideoKit for VS Code helps you understand and preview VideoKit media while writing Python. It reads the installed VideoKit package API for coding assistance and uses a temporary hover thumbnail plus an interactive preview panel for a video loaded with a literal path. The extension is optional. The Python package works independently of VS Code.
When published, its Marketplace identifier will be
At a glance
Hover video previewIn a Python file, load a video using a string literal:
Hover your mouse over the The panel provides:
The panel uses VS Code's built-in webview video playback. It does not autoplay. Playback depends on the codecs supported by the installed VS Code runtime; H.264 MP4 is a good choice when a format cannot be played. Close the panel when you are done. Opening another hover preview reuses the panel for that video. Why does hover need a click? VS Code hover popups are static documentation surfaces; they cannot contain a reliable interactive video player or draggable timeline. VideoKit uses the hover for the thumbnail and one-click launch, then opens a real player panel for smooth seeking and playback. Supported path pattern and path resolutionThe current preview recognizes a string path passed directly to the Absolute paths are used directly. For relative paths, the extension first looks
relative to the VS Code workspace folder, then relative to the Python file's
folder. It displays a helpful preview-unavailable message if the file is missing
or cannot be decoded. Dynamic paths such as The thumbnail is generated only when a path is hovered, is bounded to about 360 × 203 pixels, and is cached for the same document version and path line. The actual player reads the original local file on demand and only requests its metadata initially, rather than copying the full video into the extension. Python coding helpCompletionsAfter a known VideoKit value and a dot, completions list implemented methods and attributes for its inferred package type. API names and signatures are queried from the installed Python package, so the extension does not advertise an independently maintained list of methods. Hover documentationHover over a recognized VideoKit method to see its signature and docstring from the package. Hover over a simple inferred variable to see the corresponding VideoKit class documentation. Media-path hovers show the video preview described above. Signature helpAs you type calls such as SnippetsPython snippets are available for:
Refreshing package informationRun VideoKit: Refresh Python API after changing the selected Python environment or upgrading VideoKit. The command clears cached API and preview information so it is read again on the next request. Python environment and requirements
From the project checkout, choose the environment in VS Code and install the package into it:
When VideoKit is published, a normal The extension communicates with the package by launching a short-lived Python helper and exchanging JSON over stdin/stdout. It does not execute the Python file being edited. Requests are cancellable, have a timeout, and the extension reports missing package or preview errors rather than silently pretending a preview succeeded. Current limits
DevelopmentFrom this directory:
The project is licensed under MIT; the license text is included in the extension
package as Open the parent VideoKit workspace, choose Run VideoKit Extension, and try the hover preview in the Extension Development Host. The extension is version 0.1.0 and has not been published. |