@applicaster/zapp-react-native-utils 16.0.0-rc.8 → 16.0.0-rc.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "16.0.0-rc.8",
3
+ "version": "16.0.0-rc.9",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "16.0.0-rc.8",
30
+ "@applicaster/applicaster-types": "16.0.0-rc.9",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -9,6 +9,16 @@ import { Dimensions } from "react-native";
9
9
 
10
10
  export { getPlayerActionButtons } from "./getPlayerActionButtons";
11
11
 
12
+ export const HLS_MIME_TYPES = [
13
+ "application/x-mpegURL",
14
+ "application/vnd.apple.mpegurl",
15
+ ];
16
+
17
+ export const STREAMING_VIDEO_MIME_TYPES = [
18
+ ...HLS_MIME_TYPES,
19
+ "application/dash+xml",
20
+ ];
21
+
12
22
  /**
13
23
  * Gets duration value from player manager, and from extensions
14
24
  * then checks whether the value from either is a not a valid number
@@ -80,6 +90,16 @@ export function isLive(entry: ZappEntry): boolean {
80
90
  return isEntryLive(entry) || isLiveByManager();
81
91
  }
82
92
 
93
+ export const isVideoItem = (item: Option<ZappEntry>) => {
94
+ const contentType = item?.content?.type;
95
+
96
+ return (
97
+ isString(contentType) &&
98
+ (contentType.includes("video") ||
99
+ STREAMING_VIDEO_MIME_TYPES.includes(contentType))
100
+ );
101
+ };
102
+
83
103
  export const isAudioItem = (item: Option<ZappEntry>) => {
84
104
  if (
85
105
  isString(item?.content?.type) &&