Package com.storedobject.vaadin.util
Class MediaStreamVariable
java.lang.Object
com.storedobject.vaadin.util.MediaStreamVariable
- All Implemented Interfaces:
com.vaadin.flow.server.StreamVariable,Serializable
The MediaStreamVariable class implements the StreamVariable interface to handle
streaming data with associated MIME type provided by a MediaCapture.DataReceiver.
It manages the output stream for the streaming data and handles streaming events.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.server.StreamVariable
com.vaadin.flow.server.StreamVariable.StreamingEndEvent, com.vaadin.flow.server.StreamVariable.StreamingErrorEvent, com.vaadin.flow.server.StreamVariable.StreamingEvent, com.vaadin.flow.server.StreamVariable.StreamingProgressEvent, com.vaadin.flow.server.StreamVariable.StreamingStartEvent -
Constructor Summary
ConstructorsConstructorDescriptionMediaStreamVariable(MediaCapture.DataReceiver receiver) Constructs a MediaStreamVariable instance with the specified MediaCapture.DataReceiver. -
Method Summary
Modifier and TypeMethodDescriptiongetMime()Returns the MIME type associated with the streaming media.booleanbooleanvoidonProgress(com.vaadin.flow.server.StreamVariable.StreamingProgressEvent event) voidstreamingFailed(com.vaadin.flow.server.StreamVariable.StreamingErrorEvent event) voidstreamingFinished(com.vaadin.flow.server.StreamVariable.StreamingEndEvent event) voidstreamingStarted(com.vaadin.flow.server.StreamVariable.StreamingStartEvent event)
-
Constructor Details
-
MediaStreamVariable
Constructs a MediaStreamVariable instance with the specified MediaCapture.DataReceiver.- Parameters:
receiver- the MediaCapture.DataReceiver to receive streaming data
-
-
Method Details
-
getOutputStream
- Specified by:
getOutputStreamin interfacecom.vaadin.flow.server.StreamVariable
-
isInterrupted
public boolean isInterrupted()- Specified by:
isInterruptedin interfacecom.vaadin.flow.server.StreamVariable
-
listenProgress
public boolean listenProgress()- Specified by:
listenProgressin interfacecom.vaadin.flow.server.StreamVariable
-
onProgress
public void onProgress(com.vaadin.flow.server.StreamVariable.StreamingProgressEvent event) - Specified by:
onProgressin interfacecom.vaadin.flow.server.StreamVariable
-
streamingFailed
public void streamingFailed(com.vaadin.flow.server.StreamVariable.StreamingErrorEvent event) - Specified by:
streamingFailedin interfacecom.vaadin.flow.server.StreamVariable
-
streamingFinished
public void streamingFinished(com.vaadin.flow.server.StreamVariable.StreamingEndEvent event) - Specified by:
streamingFinishedin interfacecom.vaadin.flow.server.StreamVariable
-
streamingStarted
public void streamingStarted(com.vaadin.flow.server.StreamVariable.StreamingStartEvent event) - Specified by:
streamingStartedin interfacecom.vaadin.flow.server.StreamVariable
-
getMime
Returns the MIME type associated with the streaming media.- Returns:
- the MIME type as a String
-