拿掉無用的try catch
This commit is contained in:
parent
38b39c6d1d
commit
969c91e436
@ -162,19 +162,13 @@ class GridVideoFragment : Fragment(), GstCallback {
|
|||||||
|
|
||||||
private fun playAll() {
|
private fun playAll() {
|
||||||
for (index in data.indices) {
|
for (index in data.indices) {
|
||||||
gstPlayers[index]?.apply {
|
gstPlayers[index]?.play()
|
||||||
play()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun stopAll() {
|
private fun stopAll() {
|
||||||
for (index in data.indices) {
|
for (index in data.indices) {
|
||||||
try {
|
gstPlayers[index]?.stop()
|
||||||
gstPlayers[index]?.stop()
|
|
||||||
} catch (e: IllegalStateException) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user