| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gtk.Objects.Video
Description
GtkVideo is a widget to show a MediaStream.
It is commonly combined with MediaControls to give the
user a way to control the playback.
Synopsis
- newtype Video = Video (ManagedPtr Video)
- class (GObject o, IsDescendantOf Video o) => IsVideo o
- toVideo :: (MonadIO m, IsVideo o) => o -> m Video
- videoGetAutoplay :: (HasCallStack, MonadIO m, IsVideo a) => a -> m Bool
- videoGetFile :: (HasCallStack, MonadIO m, IsVideo a) => a -> m (Maybe File)
- videoGetLoop :: (HasCallStack, MonadIO m, IsVideo a) => a -> m Bool
- videoGetMediaStream :: (HasCallStack, MonadIO m, IsVideo a) => a -> m (Maybe MediaStream)
- videoNew :: (HasCallStack, MonadIO m) => m Video
- videoNewForFile :: (HasCallStack, MonadIO m, IsFile a) => Maybe a -> m Video
- videoNewForFilename :: (HasCallStack, MonadIO m) => Maybe [Char] -> m Video
- videoNewForMediaStream :: (HasCallStack, MonadIO m, IsMediaStream a) => Maybe a -> m Video
- videoNewForResource :: (HasCallStack, MonadIO m) => Maybe Text -> m Video
- videoSetAutoplay :: (HasCallStack, MonadIO m, IsVideo a) => a -> Bool -> m ()
- videoSetFile :: (HasCallStack, MonadIO m, IsVideo a, IsFile b) => a -> Maybe b -> m ()
- videoSetFilename :: (HasCallStack, MonadIO m, IsVideo a) => a -> Maybe Text -> m ()
- videoSetLoop :: (HasCallStack, MonadIO m, IsVideo a) => a -> Bool -> m ()
- videoSetMediaStream :: (HasCallStack, MonadIO m, IsVideo a, IsMediaStream b) => a -> Maybe b -> m ()
- videoSetResource :: (HasCallStack, MonadIO m, IsVideo a) => a -> Maybe Text -> m ()
- constructVideoAutoplay :: (IsVideo o, MonadIO m) => Bool -> m (GValueConstruct o)
- getVideoAutoplay :: (MonadIO m, IsVideo o) => o -> m Bool
- setVideoAutoplay :: (MonadIO m, IsVideo o) => o -> Bool -> m ()
- clearVideoFile :: (MonadIO m, IsVideo o) => o -> m ()
- constructVideoFile :: (IsVideo o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getVideoFile :: (MonadIO m, IsVideo o) => o -> m (Maybe File)
- setVideoFile :: (MonadIO m, IsVideo o, IsFile a) => o -> a -> m ()
- constructVideoLoop :: (IsVideo o, MonadIO m) => Bool -> m (GValueConstruct o)
- getVideoLoop :: (MonadIO m, IsVideo o) => o -> m Bool
- setVideoLoop :: (MonadIO m, IsVideo o) => o -> Bool -> m ()
- clearVideoMediaStream :: (MonadIO m, IsVideo o) => o -> m ()
- constructVideoMediaStream :: (IsVideo o, MonadIO m, IsMediaStream a) => a -> m (GValueConstruct o)
- getVideoMediaStream :: (MonadIO m, IsVideo o) => o -> m (Maybe MediaStream)
- setVideoMediaStream :: (MonadIO m, IsVideo o, IsMediaStream a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Video Source # | |
| GObject Video Source # | |
Defined in GI.Gtk.Objects.Video | |
| ManagedPtrNewtype Video Source # | |
Defined in GI.Gtk.Objects.Video Methods toManagedPtr :: Video -> ManagedPtr Video | |
| TypedObject Video Source # | |
Defined in GI.Gtk.Objects.Video Methods glibType :: IO GType | |
| IsGValue Video Source # | Convert |
Defined in GI.Gtk.Objects.Video | |
| HasParentTypes Video Source # | |
Defined in GI.Gtk.Objects.Video | |
| type ParentTypes Video Source # | |
Defined in GI.Gtk.Objects.Video | |
class (GObject o, IsDescendantOf Video o) => IsVideo o Source #
Instances
| (GObject o, IsDescendantOf Video o) => IsVideo o Source # | |
Defined in GI.Gtk.Objects.Video | |
Methods
Overloaded methods
getAutoplay
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> m Bool | Returns: |
Returns True if videos have been set to loop via videoSetLoop.
getFile
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> m (Maybe File) | Returns: The file played by |
Gets the file played by self or Nothing if not playing back
a file.
getLoop
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> m Bool | Returns: |
Returns True if videos have been set to loop via videoSetLoop.
getMediaStream
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> m (Maybe MediaStream) | Returns: The media stream managed by |
Gets the media stream managed by self or Nothing if none.
new
Creates a new empty Video.
newForFile
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => Maybe a |
|
| -> m Video | Returns: a new |
Creates a Video to play back the given file.
newForFilename
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe [Char] |
|
| -> m Video | Returns: a new |
Creates a Video to play back the given filename.
This is a utility function that calls videoNewForFile,
See that function for details.
newForMediaStream
videoNewForMediaStream Source #
Arguments
| :: (HasCallStack, MonadIO m, IsMediaStream a) | |
| => Maybe a |
|
| -> m Video | Returns: a new |
Creates a Video to play back the given stream.
newForResource
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe Text |
|
| -> m Video | Returns: a new |
Creates a Video to play back the resource at the
given resourcePath.
This is a utility function that calls videoNewForFile,
setAutoplay
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether self automatically starts playback when it becomes visible
or when a new file gets loaded.
setFile
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a, IsFile b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Makes self play the given file.
setFilename
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> Maybe Text |
|
| -> m () |
Makes self play the given filename.
This is a utility function that calls videoSetFile,
setLoop
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether new files loaded by self should be set to loop.
setMediaStream
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a, IsMediaStream b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the media stream to be played back. self will take full control
of managing the media stream. If you want to manage a media stream
yourself, consider using a Image for display.
If you want to display a file, consider using videoSetFile
instead.
setResource
Arguments
| :: (HasCallStack, MonadIO m, IsVideo a) | |
| => a |
|
| -> Maybe Text |
|
| -> m () |
Makes self play the resource at the given resourcePath.
This is a utility function that calls videoSetFile,
Properties
autoplay
If the video should automatically begin playing.
constructVideoAutoplay :: (IsVideo o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “autoplay” property. This is rarely needed directly, but it is used by new.
getVideoAutoplay :: (MonadIO m, IsVideo o) => o -> m Bool Source #
Get the value of the “autoplay” property.
When overloading is enabled, this is equivalent to
get video #autoplay
setVideoAutoplay :: (MonadIO m, IsVideo o) => o -> Bool -> m () Source #
Set the value of the “autoplay” property.
When overloading is enabled, this is equivalent to
setvideo [ #autoplay:=value ]
file
The file played by this video if the video is playing a file.
clearVideoFile :: (MonadIO m, IsVideo o) => o -> m () Source #
Set the value of the “file” property to Nothing.
When overloading is enabled, this is equivalent to
clear #file
constructVideoFile :: (IsVideo o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “file” property. This is rarely needed directly, but it is used by new.
getVideoFile :: (MonadIO m, IsVideo o) => o -> m (Maybe File) Source #
Get the value of the “file” property.
When overloading is enabled, this is equivalent to
get video #file
setVideoFile :: (MonadIO m, IsVideo o, IsFile a) => o -> a -> m () Source #
Set the value of the “file” property.
When overloading is enabled, this is equivalent to
setvideo [ #file:=value ]
loop
If new media files should be set to loop.
constructVideoLoop :: (IsVideo o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “loop” property. This is rarely needed directly, but it is used by new.
getVideoLoop :: (MonadIO m, IsVideo o) => o -> m Bool Source #
Get the value of the “loop” property.
When overloading is enabled, this is equivalent to
get video #loop
setVideoLoop :: (MonadIO m, IsVideo o) => o -> Bool -> m () Source #
Set the value of the “loop” property.
When overloading is enabled, this is equivalent to
setvideo [ #loop:=value ]
mediaStream
The media-stream played
clearVideoMediaStream :: (MonadIO m, IsVideo o) => o -> m () Source #
Set the value of the “media-stream” property to Nothing.
When overloading is enabled, this is equivalent to
clear #mediaStream
constructVideoMediaStream :: (IsVideo o, MonadIO m, IsMediaStream a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “media-stream” property. This is rarely needed directly, but it is used by new.
getVideoMediaStream :: (MonadIO m, IsVideo o) => o -> m (Maybe MediaStream) Source #
Get the value of the “media-stream” property.
When overloading is enabled, this is equivalent to
get video #mediaStream
setVideoMediaStream :: (MonadIO m, IsVideo o, IsMediaStream a) => o -> a -> m () Source #
Set the value of the “media-stream” property.
When overloading is enabled, this is equivalent to
setvideo [ #mediaStream:=value ]