Skip to content

Commit

Permalink
fix safari issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rlucke committed Apr 22, 2021
1 parent 6b4bf99 commit 4c44407
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions assets/static/courseware.js
Original file line number Diff line number Diff line change
Expand Up @@ -44128,7 +44128,7 @@ function clearHash(el) {
makeBlob: function makeBlob() {
var $view = this;
var control = $view.$('.cw-audio-gallery-content-slide-control')[0];
this.blob = new Blob($view.chunks, { type: 'audio/ogg' });
this.blob = new Blob($view.chunks, { type: 'audio/mpeg' });
var url = URL.createObjectURL(this.blob),
audio = document.createElement('audio');
audio.controls = true;
Expand Down Expand Up @@ -104071,7 +104071,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
}
content = JSON.parse(content);
if (content.type == 'countdown') {
this.countdown(new Date(content.date + " " + content.time).getTime());
this.countdown(new Date(content.date + "T" + content.time).getTime());
$view.$('.cw-date-countdown').show();
}
if (content.type == 'date') {
Expand Down Expand Up @@ -104288,7 +104288,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
}, 1000);
},
date: function date(date, time) {
var date = new Date(date + ' ' + time);
var date = new Date(date + 'T' + time);
this.$('.cw-date-date-digits[data-date="date"] .cw-date-date-number').html(("0" + date.getDate()).slice(-2) + '.' + ("0" + (date.getMonth() + 1)).slice(-2) + '.' + date.getFullYear());
this.$('.cw-date-date-digits[data-date="time"] .cw-date-date-number').html(("0" + date.getHours()).slice(-2) + ':' + ("0" + date.getMinutes()).slice(-2));
}
Expand Down
2 changes: 1 addition & 1 deletion assets/static/courseware.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blocks/AudioGalleryBlock/AudioGalleryBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function store_recording_handler(array $data)
$tempDir = $GLOBALS['TMP_PATH'].'/'.uniqid();
mkdir($tempDir);
//create file in temp dir
$filename = 'Courseware-Aufnahme-'.date("d.m.Y-H:i", time()).'.ogg';
$filename = 'Courseware-Aufnahme-'.date("d.m.Y-H:i", time()).'.mp3';
file_put_contents($tempDir.'/'.$filename, base64_decode($audio));
// get personal root folder

Expand Down
2 changes: 1 addition & 1 deletion blocks/AudioGalleryBlock/js/student_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default StudentView.extend({
makeBlob(){
var $view = this;
var control = $view.$('.cw-audio-gallery-content-slide-control')[0];
this.blob = new Blob($view.chunks, {type: 'audio/ogg' })
this.blob = new Blob($view.chunks, {type: 'audio/mpeg' })
let url = URL.createObjectURL(this.blob),
audio = document.createElement('audio');
audio.controls = true;
Expand Down
2 changes: 1 addition & 1 deletion blocks/AudioGalleryBlock/templates/student_view.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="{{user_avatar}}">
{{#file_url}}
<audio class="cw-audio-gallery-player" controls>
<source src="{{file_url}}">
<source src="{{file_url}}" type="audio/mpeg">
</audio>
{{/file_url}}
<input type="hidden" class="cw-audio-gallery-userhasrecord" value="{{#file_url}}true{{/file_url}}{{^file_url}}false{{/file_url}}">
Expand Down
4 changes: 2 additions & 2 deletions blocks/DateBlock/js/student_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default StudentView.extend({
}
content = JSON.parse(content);
if (content.type == 'countdown') {
this.countdown(new Date(content.date + " "+ content.time).getTime());
this.countdown(new Date(content.date + "T"+ content.time).getTime());
$view.$('.cw-date-countdown').show();
}
if (content.type == 'date') {
Expand Down Expand Up @@ -87,7 +87,7 @@ export default StudentView.extend({
},

date(date, time) {
var date = new Date(date+' '+time);
var date = new Date(date+'T'+time);
this.$('.cw-date-date-digits[data-date="date"] .cw-date-date-number').html(("0" + date.getDate()).slice(-2)+'.'+("0" + (date.getMonth()+1)).slice(-2)+'.'+date.getFullYear());
this.$('.cw-date-date-digits[data-date="time"] .cw-date-date-number').html(("0" + date.getHours()).slice(-2)+':'+("0" + date.getMinutes()).slice(-2));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "courseware",
"version": "4.7.4",
"version": "4.7.6",
"description": "Interaktive multimediale Lernmodule erstellen und bereitstellen",
"repository": "git@github.com:virtUOS/courseware.git",
"author": "Zentrum virtUOS / ELAN e.V.",
Expand Down

0 comments on commit 4c44407

Please sign in to comment.