#1076 - Video playback support

This commit is contained in:
Moez Bhatti
2018-06-06 15:52:19 -04:00
parent d6fa04f56d
commit b2b4e140e2
12 changed files with 102 additions and 25 deletions
@@ -97,19 +97,12 @@ class Navigator @Inject constructor(private val context: Context, private val no
startActivity(intent)
}
fun showImage(partId: Long) {
fun showMedia(partId: Long) {
val intent = Intent(context, GalleryActivity::class.java)
intent.putExtra("partId", partId)
startActivity(intent)
}
fun showVideo(uri: Uri, type: String) {
val intent = Intent(Intent.ACTION_VIEW, uri)
.setDataAndType(uri, type)
startActivityExternal(intent)
}
/**
* Shows the attachment full-screen
* The transitionName for the view should be the id of the image being displayed