- java.lang.Object
-
- com.gluonhq.attach.video.impl.DefaultVideoService
-
- All Implemented Interfaces:
VideoService
- Direct Known Subclasses:
AndroidVideoService
,IOSVideoService
public abstract class DefaultVideoService extends java.lang.Object implements VideoService
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
debug
protected javafx.collections.ObservableList<java.lang.String>
playlist
protected java.util.Map<java.lang.String,java.lang.Boolean>
playlistMap
-
Constructor Summary
Constructors Constructor Description DefaultVideoService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkFileInResources(java.lang.String filePath)
protected java.io.File
getFileFromAssets(java.lang.String filePath)
javafx.collections.ObservableList<java.lang.String>
getPlaylist()
Returns an observable list with media file names.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gluonhq.attach.video.VideoService
currentIndexProperty, fullScreenProperty, hide, pause, play, setControlsVisible, setCurrentIndex, setFullScreen, setLooping, setPosition, show, statusProperty, stop
-
-
-
-
Method Detail
-
getPlaylist
public javafx.collections.ObservableList<java.lang.String> getPlaylist()
Description copied from interface:VideoService
Returns an observable list with media file names.Supported formats:
The media files (video and audio) can either be a valid URL or they can be provided in the resources folder.
For example, the following media files:
- /src/main/resources/media1.mp4
- /src/main/resources/video/media2.mp4
- http://www.host.com/media3.mp4
getPlaylist().addAll("media1.mp4", "video/media2.mp4", "http://www.host.com/media3.mp4");
- Specified by:
getPlaylist
in interfaceVideoService
- Returns:
- an
ObservableList
of media file names, either in the resource folder or valid URLs
-
checkFileInResources
protected boolean checkFileInResources(java.lang.String filePath)
-
getFileFromAssets
protected java.io.File getFileFromAssets(java.lang.String filePath)
-
-