1.0.9 • Published 1 month ago

media-kit-360-player v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Presentation Media Kit

Introducing two essential components to enhance visual experiences in your web applications:

SpinImages360 Component: Create interactive 360-degree image galleries with drag or autoplay functionality. Customize behavior and appearance while supporting event notifications for seamless integration. Additionally, the component offers zoom functionality in the form of a magnifying glass and optimized treatment for mobile devices, ensuring a smooth user experience across various platforms.

RenderVideo Component: Empower your applications with video rendering and playback control. Features include autoplay, loop, mute, and customizable controls. Specify source and fallback URLs for consistent video delivery.

With these components, you can create engaging and dynamic visual experiences that elevate the standard of your web applications.

SpinImages360 Component Documentation

Example

ParameterTypeDescription
imagesBaseUrlArrayAn array of URLs representing the base URLs for the images.
mouseDragSpeedNumberThe speed factor for mouse drag. Higher values mean slower dragging.
reverseBooleanDetermines whether the images should rotate in reverse order.
autoplaySpeedNumberThe speed of autoplay rotation in seconds per image.
autoplayBooleanDetermines whether the gallery should autoplay.
widthNumberThe width of the gallery container in pixels.
heightNumberThe height of the gallery container in pixels.
showRotationIconOnStartupBooleanDetermines whether the rotation icon should be shown initially.
imageInitialIndexNumberThe initial index of the image to be displayed in the gallery.
shouldNotifyEventsBooleanDetermines whether event notifications should be enabled.
notifyOnPointerDownFunctionA function to be called when a pointer down event occurs.
notifyOnPointerUpFunctionA function to be called when a pointer up event occurs.
notifyOnPointerMovedFunctionA function to be called when a pointer move event occurs.

Example Usage:

<SpinImages360  
 imagesBaseUrl={[ 
     'https://example.com/image1.jpg', 
     'https://example.com/image2.jpg', 
     'https://example.com/image3.jpg' 
 ]} 
 autoplay={true} 
 width={600} 
 height={400} 
 showRotationIconOnStartup={true} 
 imageInitialIndex={1} 
 shouldNotifyEvents={true} 
 notifyOnPointerDown={(x, y) => console.log('Pointer down at:', x, y)} 
 notifyOnPointerUp={(x, y) => console.log('Pointer up at:', x, y)} 
 notifyOnPointerMoved={(x, y) => console.log('Pointer moved to:', x, y)}
/>  

RenderVideo Component Documentation

Example

ParameterTypeDescription
srcStringThe URL of the video to be played.
autoplayBooleanDetermines whether the video should autoplay.
loopBooleanDetermines whether the video should loop.
mutedBooleanDetermines whether the video should be muted.
widthString or NumberThe width of the video container.
heightString or NumberThe height of the video container.
showControlsBooleanDetermines whether video controls should be shown.
showRetryButtonBooleanDetermines whether the retry button should be shown when an error occurs.
showVolumeControlBooleanDetermines whether the volume control should be shown.
showProgressBarBooleanDetermines whether the progress bar should be shown.
showPlayPauseButtonBooleanDetermines whether the play/pause button should be shown.
showLoadingOverlayBooleanDetermines whether the loading overlay should be shown.
RetryButtonComponentComponentThe component used for the retry button.
srcFallbackStringThe fallback URL of the video in case of loading errors.
LoadingOverlayComponentComponentThe component used for the loading overlay.
LoadingErrorOverlayComponentComponentThe component used for the loading error overlay.
TextLoadingOverlayComponentComponentThe component used for the text loading overlay.
playPauseButtonComponentComponentThe component used for the play/pause button.
progressBarColorStringThe color of the progress bar.
volumeControlColorStringThe color of the volume control.

Example Usage:

<RenderVideo  
 src="https://example.com/video.mp4"
 srcFallback="https://example.com/fallback-video.mp4"
 autoplay={true} 
 loop={true} 
 muted={false} 
 width={500} 
 height={300} 
 showControls={true} 
 showRetryButton={true} 
 showVolumeControl={true} 
 showProgressBar={true} 
 showPlayPauseButton={true} 
 showLoadingOverlay={true} 
 RetryButtonComponent={CustomRetryButton}
 LoadingOverlayComponent={CustomLoadingOverlay} 
 LoadingErrorOverlayComponent={CustomErrorOverlay} 
 TextLoadingOverlayComponent={CustomTextLoadingOverlay} 
 playPauseButtonComponent={CustomPlayPauseButton}
 progressBarColor="#ff0000" 
 volumeControlColor="#00ff00"
/>  

Running

 npm i media-kit-360-player

follow the examples