@vonaffenfels/slate-editor 1.0.58 → 1.0.59

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": "@vonaffenfels/slate-editor",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -71,7 +71,7 @@
71
71
  "cssnano": "^5.0.1",
72
72
  "escape-html": "^1.0.3"
73
73
  },
74
- "gitHead": "e85142a8a7b6863ad2aa7a1ded8ee89a5f4d64aa",
74
+ "gitHead": "45e9d0390c7c19fbfa54c8bf9c3cef5a076e4198",
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  }
@@ -128,14 +128,20 @@ export const Asset = ({
128
128
 
129
129
  let assetType = "image";
130
130
 
131
- if (title?.endsWith(".mp3")) {
131
+ if (mediaUrl?.endsWith(".mp3")) {
132
132
  assetType = "audio";
133
133
  }
134
134
 
135
+ if (mediaUrl?.endsWith(".mp4") || mediaUrl?.endsWith(".mov")) {
136
+ assetType = "video";
137
+ }
138
+
135
139
  const renderMedia = () => {
136
140
  switch (assetType) {
137
141
  case "audio":
138
142
  return <audio src={mediaUrl} className="mt-2 w-full" controls />;
143
+ case "video":
144
+ return <video src={mediaUrl} className="mt-2 w-full rounded-md" controls />;
139
145
  case "image":
140
146
  default:
141
147
  return <img src={mediaUrl} width="100%" className="mt-2 rounded-md" />;