@es-joy/jsoe 0.24.0 → 0.24.1

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": "@es-joy/jsoe",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./src/index.js",
@@ -232,7 +232,10 @@ const blobType = {
232
232
  class: 'video',
233
233
  $on: {
234
234
  loadeddata () {
235
- URL.revokeObjectURL(objURL);
235
+ // Bug in Safari revoking the URL here
236
+ if (!(/iPad|iPhone|iPod|Safari/u).test(navigator.userAgent)) {
237
+ URL.revokeObjectURL(objURL);
238
+ }
236
239
  }
237
240
  }
238
241
  });
@@ -767,7 +770,9 @@ const blobType = {
767
770
  // Todo: Could check codecs for allowable values
768
771
  // as second argument
769
772
  // see https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/isTypeSupported_static
770
- const mimeType = 'video/webm';
773
+ // const mimeType = 'video/webm';
774
+ const mimeType = 'video/mp4';
775
+
771
776
  const mediaRecorder = new MediaRecorder(previewMedia.$stream, {
772
777
  mimeType
773
778
  });
@@ -807,7 +812,10 @@ const blobType = {
807
812
  recordedMedia.src = url;
808
813
 
809
814
  recordedMedia.addEventListener('loadeddata', () => {
810
- URL.revokeObjectURL(url);
815
+ // Bug in Safari revoking the URL here
816
+ if (!(/iPad|iPhone|iPod|Safari/u).test(navigator.userAgent)) {
817
+ URL.revokeObjectURL(url);
818
+ }
811
819
  });
812
820
 
813
821
  const root = /** @type {HTMLDivElement} */
@@ -261,7 +261,9 @@ const fileType = {
261
261
  class: 'video',
262
262
  $on: {
263
263
  loadeddata () {
264
- URL.revokeObjectURL(objURL);
264
+ if (!(/iPad|iPhone|iPod|Safari/u).test(navigator.userAgent)) {
265
+ URL.revokeObjectURL(objURL);
266
+ }
265
267
  }
266
268
  }
267
269
  });
@@ -858,7 +860,8 @@ const fileType = {
858
860
  // Todo: Could check codecs for allowable values
859
861
  // as second argument
860
862
  // see https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/isTypeSupported_static
861
- const mimeType = 'video/webm';
863
+ // const mimeType = 'video/webm';
864
+ const mimeType = 'video/mp4';
862
865
  const mediaRecorder = new MediaRecorder(previewMedia.$stream, {
863
866
  mimeType
864
867
  });
@@ -895,12 +898,14 @@ const fileType = {
895
898
  recordedMedia.src = url;
896
899
 
897
900
  recordedMedia.addEventListener('loadeddata', () => {
898
- URL.revokeObjectURL(url);
901
+ if (!(/iPad|iPhone|iPod|Safari/u).test(navigator.userAgent)) {
902
+ URL.revokeObjectURL(url);
903
+ }
899
904
  });
900
905
 
901
906
  const file = new File(
902
907
  [blob],
903
- 'placeholder.webm',
908
+ 'placeholder.mp4',
904
909
  {type: mimeType}
905
910
  );
906
911
  console.log('file', file);
@@ -179,7 +179,7 @@ const blobHTMLType = {
179
179
  resizeMaxWidth: -1,
180
180
  plugins: 'xhtml,plaintext,undo',
181
181
  emoticonsRoot: 'node_modules/sceditor/',
182
- style: 'node_modules/sceditor/minified/themes/content/default.min.css'
182
+ style: '/node_modules/sceditor/minified/themes/content/default.min.css'
183
183
  });
184
184
  textarea.sceditorInstance = sceditor.instance(textarea);
185
185
  if (!isNullish(value)) {