@takeoffmedia/react-native-penthera 0.2.26 → 0.2.28

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.
@@ -381,7 +381,7 @@ class Penthera: RCTEventEmitter, VirtuosoDownloadEngineNotificationsDelegate {
381
381
  title: va.description,
382
382
  data: dataItem,
383
383
  thumbnails: thumbnails,
384
- isCompleted: va.isPlayable,
384
+ isCompleted: va.downloadCompleteDateTime != nil ? true : false,
385
385
  isPaused: va.isPaused,
386
386
  percentage: Float(va.fractionComplete) / Float(va.estimatedSize)
387
387
  )
@@ -455,6 +455,13 @@ class Penthera: RCTEventEmitter, VirtuosoDownloadEngineNotificationsDelegate {
455
455
  return
456
456
  }
457
457
 
458
+ if asset.firstPlayDateTime == nil {
459
+ DispatchQueue.global().async {
460
+ asset.firstPlayDateTime = Date()
461
+ asset.save()
462
+ }
463
+ }
464
+
458
465
  let decoder = JSONEncoder()
459
466
  var hasZoom: Bool? = false
460
467
  do {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeoffmedia/react-native-penthera",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",