Commit 647f7cf3 authored by Dele Olajide's avatar Dele Olajide Committed by JC Brand

Deleolajide m4a webm support (#1217)

* Add support for webm video and m4a audio media files
* updated CHANGES.md
parent 99bd9800
# Changelog
## 4.0.2 (2018-??-??)
- M4A and WEBM files when sent as XEP-0066 Out of Band Data, are now playable directly in chat
## 4.0.1 (2018-09-19)
- Use https://compliance.conversations.im instead of (dead) https://xmpp.net
......
......@@ -314,6 +314,7 @@
lower_filename.endsWith('mp3') || lower_filename.endsWith('mp4') ||
lower_filename.endsWith('jpg') || lower_filename.endsWith('jpeg') ||
lower_filename.endsWith('png') || lower_filename.endsWith('gif') ||
lower_filename.endsWith('m4a') || lower_filename.endsWith('webm') ||
lower_filename.endsWith('svg')) {
return url;
......@@ -341,7 +342,7 @@
u.renderMovieURL = function (_converse, url) {
const { __ } = _converse;
if (url.endsWith('mp4')) {
if (url.endsWith('mp4') || url.endsWith('webm')) {
return tpl_video({
'url': url,
'label_download': __('Download video file')
......@@ -352,7 +353,7 @@
u.renderAudioURL = function (_converse, url) {
const { __ } = _converse;
if (url.endsWith('mp3')) {
if (url.endsWith('mp3') || url.endsWith('m4a')) {
return tpl_audio({
'url': url,
'label_download': __('Download audio file')
......@@ -471,7 +472,7 @@
el.style.overflow = 'hidden';
function draw () {
function draw () {
height -= original_height/steps;
if (height > 0) {
el.style.height = height + 'px';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment