Skip to content
......@@ -112,6 +112,7 @@ import { SiteService } from './services/site.service';
import { MarketingComponent } from './components/marketing/marketing.component';
import { MarketingFooterComponent } from './components/marketing/footer.component';
import { ToggleComponent } from './components/toggle/toggle.component';
import { MarketingAsFeaturedInComponent } from './components/marketing/as-featured-in.component';
@NgModule({
imports: [
......@@ -213,6 +214,7 @@ import { ToggleComponent } from './components/toggle/toggle.component';
ToggleComponent,
MarketingComponent,
MarketingFooterComponent,
MarketingAsFeaturedInComponent,
],
exports: [
MINDS_PIPES,
......@@ -302,6 +304,7 @@ import { ToggleComponent } from './components/toggle/toggle.component';
DraggableListComponent,
ToggleComponent,
MarketingComponent,
MarketingAsFeaturedInComponent,
],
providers: [
SiteService,
......
......@@ -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;
}
......
<div class="m-marketing__asFeaturedIn">
<div class="m-marketingAsFeaturedIn__title" i18n>
As featured in
</div>
<ul>
<li class="m-marketingAsFeaturedIn__item--bigger">
<img [src]="cdnAssetsUrl + 'assets/marketing/bbc.png'" alt="BBC" />
</li>
<li>
<img
[src]="cdnAssetsUrl + 'assets/marketing/foxnews.png'"
alt="Fox News"
/>
</li>
<li>
<img [src]="cdnAssetsUrl + 'assets/marketing/forbes.png'" alt="Forbes" />
</li>
<li>
<img
[src]="cdnAssetsUrl + 'assets/marketing/techcrunch.png'"
alt="TechCrunch"
/>
</li>
<li>
<img
[src]="cdnAssetsUrl + 'assets/marketing/reuters.png'"
alt="Reuters"
/>
</li>
<li>
<img [src]="cdnAssetsUrl + 'assets/marketing/wired.png'" alt="Wired" />
</li>
<li>
<img
[src]="cdnAssetsUrl + 'assets/marketing/tjre.png'"
alt="The Joe Rogan Experience"
/>
</li>
</ul>
</div>
@import '../../../foundation/grid-values';
.m-marketing__asFeaturedIn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
max-width: 1084px;
margin: 40px auto 0;
@media screen and (max-width: $m-grid-min-vp) {
display: block;
margin: 20px 0 45px;
padding: 0 12px;
}
.m-marketingAsFeaturedIn__title {
margin-right: 96px;
@include m-theme() {
color: themed($m-grey-400);
}
@media screen and (max-width: $m-grid-min-vp) {
text-align: center;
margin: 0 0 20px;
}
}
ul {
flex-grow: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin: 0;
padding: 0;
list-style: none;
> li {
img {
width: 55px;
height: 55px;
object-fit: contain;
@media screen and (max-width: $m-grid-min-vp) {
width: 40px;
height: 40px;
}
}
&.m-marketingAsFeaturedIn__item--bigger {
img {
width: 96px;
height: 96px;
@media screen and (max-width: $m-grid-min-vp) {
width: 40px;
height: 40px;
}
}
}
}
}
}
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'm-marketing__asFeaturedIn',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: 'as-featured-in.component.html',
})
export class MarketingAsFeaturedInComponent {
readonly cdnAssetsUrl: string = window.Minds.cdn_assets_url;
}
......@@ -3,6 +3,8 @@
<ng-content select=".m-marketing__main"></ng-content>
</div>
<ng-content select="[slot=2]"></ng-content>
<div class="m-marketing__sep" *ngIf="bodyWrapper?.children?.length > 0"></div>
<div class="m-marketing__extrasWrapper" #bodyWrapper>
......
.mf-jumpAnchor {
// used for element.scrollIntoView targets
position: relative;
top: 0;
width: 0;
height: 0;
visibility: hidden;
m-body.has-v2-navbar & {
top: -52px;
}
}
export type Currency = 'usd' | 'tokens';
export const tokenRate = 4;
// TODO: Move to an async service
export default function currency(tokens: number, currency: Currency): string {
switch (currency) {
case 'usd':
return `$${(tokens / tokenRate).toLocaleString()}`;
case 'tokens':
return `${tokens.toLocaleString()} tokens`;
}
}
......@@ -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'
}
]"
......
......@@ -7,8 +7,8 @@ m-upgrades__buyTokens {
.m-upgradesBuyTokens__wrapper {
padding: 40px 60px 60px;
background: url('http://placekitten.com/591/362') no-repeat right center
#726061;
background: url('<%= APP_CDN %>/assets/marketing/buytokens_bg.jpg')
no-repeat right center #726061;
background-size: contain;
color: #ffffff;
......
......@@ -5,4 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: 'buy-tokens.component.html',
})
export class BuyTokensComponent {}
export class BuyTokensComponent {
readonly cdnAssetsUrl: string = window.Minds.cdn_assets_url;
}