Skip to content
Commits on Source (7)
......@@ -247,7 +247,9 @@ export class EmbedImage {
if ($image.tagName === 'SPAN') {
$image = $image.parentNode.querySelector('img');
} else if ($image.tagName !== 'IMG') {
}
if (!$image || $image.tagName !== 'IMG') {
return;
}
......
......@@ -184,7 +184,10 @@
[src]="[
{
res: '360',
uri: 'api/v1/media/' + comment.custom_data.guid + '/play',
uri:
'api/v1/media/' +
comment.custom_data.guid +
'/play?s=comment',
type: 'video/mp4'
}
]"
......
......@@ -296,7 +296,7 @@
height="300px"
[muted]="false"
[poster]="activity.custom_data.thumbnail_src"
[src]="[{ 'res': '360', 'uri': 'api/v1/media/' + activity.custom_data.guid + '/play', 'type': 'video/mp4' }]"
[src]="[{ 'res': '360', 'uri': 'api/v1/media/' + activity.custom_data.guid + '/play?s=activity', 'type': 'video/mp4' }]"
[guid]="activity.custom_data.guid"
[playCount]="activity['play:count']"
[torrent]="[{ res: '360', key: activity.custom_data.guid + '/360.mp4' }]"
......
......@@ -115,11 +115,11 @@ export class MindsVideoDirectHttpPlayer
return this.player.nativeElement;
}
play() {
async play() {
const player = this.getPlayer();
try {
player.play();
await player.play();
} catch (e) {
console.log(e);
}
......@@ -135,11 +135,11 @@ export class MindsVideoDirectHttpPlayer
}
}
toggle() {
async toggle() {
const player = this.getPlayer();
if (player.paused) {
this.play();
await this.play();
} else {
this.pause();
}
......
<ng-container *ngIf="current">
<m-video--direct-http-player
*ngIf="current.type === 'direct-http'"
*ngIf="current.type === 'direct-http' || true"
class="m-video--player"
[src]="current.src"
[poster]="poster"
......@@ -18,7 +18,7 @@
></m-video--direct-http-player>
<m-video--torrent-player
*ngIf="current.type === 'torrent'"
*ngIf="current.type === 'torrent' && false"
class="m-video--player"
[src]="current.src"
[poster]="poster"
......@@ -39,7 +39,7 @@
<i
*ngIf="
(!playerRef.isPlaying() && !playerRef.isLoading()) ||
(isActivity && metadataLoaded && !playerRef.isPlaying())
(shouldPlayInModal && !playerRef.isPlaying())
"
class="material-icons minds-video-play-icon"
(click)="clickedVideo()"
......
......@@ -435,9 +435,9 @@ export class MindsVideoComponent implements OnDestroy {
}
clickedVideo() {
if (!this.metadataLoaded) {
return;
}
// if (!this.metadataLoaded) {
// return;
// }
const isNotTablet = Math.min(screen.width, screen.height) < 768;
......
......@@ -56,7 +56,7 @@
[src]="[
{
res: '360',
uri: 'api/v1/media/' + entity.entity_guid + '/play',
uri: 'api/v1/media/' + entity.entity_guid + '/play?s=modal',
type: 'video/mp4'
}
]"
......
......@@ -170,6 +170,11 @@ m-overlay-modal {
m-video {
position: static;
video {
width: 100%;
height: 100%;
}
.minds-video-bar-full {
.m-video--progress-bar {
padding-right: 0;
......
......@@ -151,8 +151,12 @@ export class MediaModalComponent implements OnInit, OnDestroy {
switch (this.entity.custom_type) {
case 'video':
this.contentType = 'video';
this.entity.width = this.entity.custom_data.dimensions.width;
this.entity.height = this.entity.custom_data.dimensions.height;
this.entity.width = this.entity.custom_data.dimensions
? this.entity.custom_data.dimensions.width
: 1280;
this.entity.height = this.entity.custom_data.dimensions
? this.entity.custom_data.dimensions.height
: 720;
this.entity.thumbnail_src = this.entity.custom_data.thumbnail_src;
break;
case 'batch':
......
......@@ -13,7 +13,7 @@ export class MessengerSounds {
};
play(sound: string) {
if (this.canPlay()) this.sounds[sound].play();
// if (this.canPlay()) this.sounds[sound].play();
}
canPlay() {
......
......@@ -12,7 +12,7 @@
[src]="[
{
res: '360',
uri: 'api/v1/media/' + entity.guid + '/play',
uri: 'api/v1/media/' + entity.guid + '/play?s=tile',
type: 'video/mp4'
}
]"
......