slidev
slidev copied to clipboard
Supporting Synchronization for Slidev Deployments in Production Environments
Is your feature request related to a problem? Please describe.
In the current implementation, the Slidev development environment initiated via yarn dev
synchronizes page transitions, mouse clicks, and drawing actions in the presenter view across multiple users. This synchronization feature is crucial for collaborative usage.
However, deploying Slidev on a cloud server for multi-user access presents challenges. The development mode (yarn dev
) is not suitable for production deployment. Conversely, deploying a static build using yarn build
results in the loss of synchronization capabilities, as static pages inherently do not support dynamic backend interactions.
One of my thoughts is, would it be possible to support listener functions for these operations, as well as providing functions to be able to manually set page switching (currently implemented) and painting? This way, users can use these functions to manually implement their own synchronization mechanisms.
Describe the solution you'd like
Event Listener Integration: Enable developers to define custom listener functions for slide transitions, mouse clicks, and drawing actions. These functions should trigger upon user interactions, such as page changes or drawing modifications.
Serialization Support:Enable developers to retrieve the current currentPage
and clicks
( these have now been implemented), along with the serialized drawing data.This would facilitate the transfer of drawing data across a network.
Control and Animation Functions: Introduce methods to programmatically set the slide currentPage
, clicks
(Toggle animation is also supported). Allow developers to apply all current drawings using serialized data (obtained in the previous step and transmitted over the network).
Describe alternatives you've considered
Currently, I am utilizing Vue's watch function to monitor changes in currentPage
and clicks
. However, this approach lacks efficiency and elegance. Moreover, I am uncertain about the best method to obtain a serialized form of the drawings for network transmission.