View fullscreen-video-view-media-controller-listener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Using the MediaControllerListener interface | |
fullscreenVideoView.videoUrl(videoUrl) | |
.mediaControllerListener(object : MediaControllerListener { | |
override fun onPlayClicked() { | |
// Do something when the play button is clicked | |
} | |
override fun onPauseClicked() { | |
// Do something when the pause button is clicked |
View fullscreen-video-view-error-listener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Add initially from the Builder | |
fullscreenVideoView.videoUrl(videoUrl) | |
.addOnErrorListener(object : OnErrorListener { | |
override fun onError(exception: FullscreenVideoViewException?) { | |
// Handle error | |
} | |
}) | |
// OR |
View fullscreen-video-view-hide-progress.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Hide initially from the Builder | |
fullscreenVideoView.videoUrl(videoUrl) | |
.hideProgress() | |
// OR | |
// Hide by calling the view method | |
fullscreenVideoView.hideProgress() | |
... |
View fullscreen-video-view-play-pause.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Setup the view | |
fullscreenVideoView.videoUrl(videoUrl) | |
// Play the video later | |
fullscreenVideoView.play() | |
// OR | |
// Pause the video later |
View fullscreen-video-view-thumbnail.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Drawable resource id | |
val thumbnailResId = R.drawable.video_thumbnail | |
// Add the thumbnail | |
fullscreenVideoView.videoUrl(videoUrl) | |
.thumbnail(thumbnailResId) | |
... |
View fullscreen-video-view-playback-speed.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// Add the default playback speeds | |
fullscreenVideoView.videoUrl(videoUrl) | |
.addPlaybackSpeedButton() | |
// Add custom playback speeds | |
val playbackOptions = PlaybackSpeedOptions().addSpeeds(0.25f, 0.5f, 0.75f, 1f) | |
fullscreenVideoView.videoUrl(videoUrl) | |
.addPlaybackSpeedButton() |
View fullscreen-video-view-maven.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<dependency> | |
<groupId>bg.devlabs.fullscreenvideoview</groupId> | |
<artifactId>library</artifactId> | |
<version>1.1.3</version> | |
<type>pom</type> | |
</dependency> | |
... |
View fullscreen-video-view-gradle.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
dependencies { | |
compile 'bg.devlabs.fullscreenvideoview:library:1.1.3' | |
} | |
... |
View fullscreen-video-view-xml-properties.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<bg.devlabs.fullscreenvideoview.FullscreenVideoView | |
... | |
app:enter_fullscreen_drawable="@drawable/ic_fullscreen_white_48dp" | |
app:exit_fullscreen_drawable="@drawable/ic_fullscreen_exit_white_48dp" | |
app:ffwd_drawable="@drawable/ic_fast_forward_white_48dp" | |
app:pause_drawable="@drawable/ic_pause_white_48dp" | |
app:play_drawable="@drawable/ic_play_arrow_white_48dp" | |
app:progress_color="@color/colorPrimary" | |
app:rew_drawable="@drawable/ic_fast_rewind_white_48dp" /> |
NewerOlder