mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-10 01:18:55 -05:00
feat: Embed also audio .mp3 files
This commit is contained in:
parent
2d9594eb50
commit
3d1a4dd6d6
@ -17,7 +17,7 @@ function shareOptionsList() {
|
|||||||
while (i < socialMedia.length) {
|
while (i < socialMedia.length) {
|
||||||
switch (socialMedia[i]) {
|
switch (socialMedia[i]) {
|
||||||
case 'embed':
|
case 'embed':
|
||||||
if ('video' === MediaPageStore.get('media-data').media_type) {
|
if ('video' === MediaPageStore.get('media-data').media_type || 'audio' === MediaPageStore.get('media-data').media_type) {
|
||||||
ret[socialMedia[i]] = {};
|
ret[socialMedia[i]] = {};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -54,7 +54,7 @@ export class _VideoMediaPage extends Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMediaLoad() {
|
onMediaLoad() {
|
||||||
const isVideoMedia = 'video' === MediaPageStore.get('media-type');
|
const isVideoMedia = 'video' === MediaPageStore.get('media-type') || 'audio' === MediaPageStore.get('media-type');
|
||||||
|
|
||||||
if (isVideoMedia) {
|
if (isVideoMedia) {
|
||||||
this.onViewerModeChange = this.onViewerModeChange.bind(this);
|
this.onViewerModeChange = this.onViewerModeChange.bind(this);
|
||||||
|
|||||||
@ -185,6 +185,8 @@ class MediaPageStore extends EventEmitter {
|
|||||||
switch (this.get('media-type')) {
|
switch (this.get('media-type')) {
|
||||||
case 'video':
|
case 'video':
|
||||||
case 'audio':
|
case 'audio':
|
||||||
|
this.emit('loaded_video_data');
|
||||||
|
break;
|
||||||
case 'image':
|
case 'image':
|
||||||
this.emit('loaded_' + this.get('media-type') + '_data');
|
this.emit('loaded_' + this.get('media-type') + '_data');
|
||||||
break;
|
break;
|
||||||
@ -607,7 +609,7 @@ class MediaPageStore extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isVideo() {
|
isVideo() {
|
||||||
return 'video' === this.get('media-type');
|
return 'video' === this.get('media-type') || 'audio' === this.get('media-type');
|
||||||
}
|
}
|
||||||
|
|
||||||
onPlaylistCreationCompleted(response) {
|
onPlaylistCreationCompleted(response) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user