expo-libvlc-player 6.1.12 → 6.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -671,19 +671,24 @@ class LibVlcPlayerView(
671
671
  { copyResult ->
672
672
  if (copyResult != PixelCopy.SUCCESS) {
673
673
  onEncounteredError(mapOf("error" to "Snapshot could not be taken"))
674
+ return@request
674
675
  }
675
676
 
676
- val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd-HH'h'mm'm'ss's'")
677
- val timestamp = simpleDateFormat.format(Calendar.getInstance().time)
677
+ try {
678
+ val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd-HH'h'mm'm'ss's'")
679
+ val timestamp = simpleDateFormat.format(Calendar.getInstance().time)
678
680
 
679
- val snapshotPath = path + "/vlc-snapshot-$timestamp.jpg"
680
- val file = File(snapshotPath)
681
+ val snapshotPath = path + "/vlc-snapshot-$timestamp.jpg"
682
+ val file = File(snapshotPath)
681
683
 
682
- FileOutputStream(file).use { stream ->
683
- bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream)
684
- }
684
+ FileOutputStream(file).use { stream ->
685
+ bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream)
686
+ }
685
687
 
686
- onSnapshotTaken(mapOf("path" to snapshotPath))
688
+ onSnapshotTaken(mapOf("path" to snapshotPath))
689
+ } catch (_: Exception) {
690
+ onEncounteredError(mapOf("error" to "Snapshot could not be taken"))
691
+ }
687
692
  },
688
693
  Handler(Looper.getMainLooper()),
689
694
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "6.1.12",
3
+ "version": "6.1.13",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",