Skip to content
...@@ -112,6 +112,7 @@ import { SiteService } from './services/site.service'; ...@@ -112,6 +112,7 @@ import { SiteService } from './services/site.service';
import { MarketingComponent } from './components/marketing/marketing.component'; import { MarketingComponent } from './components/marketing/marketing.component';
import { MarketingFooterComponent } from './components/marketing/footer.component'; import { MarketingFooterComponent } from './components/marketing/footer.component';
import { ToggleComponent } from './components/toggle/toggle.component'; import { ToggleComponent } from './components/toggle/toggle.component';
import { MarketingAsFeaturedInComponent } from './components/marketing/as-featured-in.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -213,6 +214,7 @@ import { ToggleComponent } from './components/toggle/toggle.component'; ...@@ -213,6 +214,7 @@ import { ToggleComponent } from './components/toggle/toggle.component';
ToggleComponent, ToggleComponent,
MarketingComponent, MarketingComponent,
MarketingFooterComponent, MarketingFooterComponent,
MarketingAsFeaturedInComponent,
], ],
exports: [ exports: [
MINDS_PIPES, MINDS_PIPES,
...@@ -302,6 +304,7 @@ import { ToggleComponent } from './components/toggle/toggle.component'; ...@@ -302,6 +304,7 @@ import { ToggleComponent } from './components/toggle/toggle.component';
DraggableListComponent, DraggableListComponent,
ToggleComponent, ToggleComponent,
MarketingComponent, MarketingComponent,
MarketingAsFeaturedInComponent,
], ],
providers: [ providers: [
SiteService, SiteService,
......
...@@ -247,7 +247,9 @@ export class EmbedImage { ...@@ -247,7 +247,9 @@ export class EmbedImage {
if ($image.tagName === 'SPAN') { if ($image.tagName === 'SPAN') {
$image = $image.parentNode.querySelector('img'); $image = $image.parentNode.querySelector('img');
} else if ($image.tagName !== 'IMG') { }
if (!$image || $image.tagName !== 'IMG') {
return; 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 @@ ...@@ -3,6 +3,8 @@
<ng-content select=".m-marketing__main"></ng-content> <ng-content select=".m-marketing__main"></ng-content>
</div> </div>
<ng-content select="[slot=2]"></ng-content>
<div class="m-marketing__sep" *ngIf="bodyWrapper?.children?.length > 0"></div> <div class="m-marketing__sep" *ngIf="bodyWrapper?.children?.length > 0"></div>
<div class="m-marketing__extrasWrapper" #bodyWrapper> <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 @@ ...@@ -184,7 +184,10 @@
[src]="[ [src]="[
{ {
res: '360', 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' type: 'video/mp4'
} }
]" ]"
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
height="300px" height="300px"
[muted]="false" [muted]="false"
[poster]="activity.custom_data.thumbnail_src" [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" [guid]="activity.custom_data.guid"
[playCount]="activity['play:count']" [playCount]="activity['play:count']"
[torrent]="[{ res: '360', key: activity.custom_data.guid + '/360.mp4' }]" [torrent]="[{ res: '360', key: activity.custom_data.guid + '/360.mp4' }]"
......
...@@ -115,11 +115,11 @@ export class MindsVideoDirectHttpPlayer ...@@ -115,11 +115,11 @@ export class MindsVideoDirectHttpPlayer
return this.player.nativeElement; return this.player.nativeElement;
} }
play() { async play() {
const player = this.getPlayer(); const player = this.getPlayer();
try { try {
player.play(); await player.play();
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
...@@ -135,11 +135,11 @@ export class MindsVideoDirectHttpPlayer ...@@ -135,11 +135,11 @@ export class MindsVideoDirectHttpPlayer
} }
} }
toggle() { async toggle() {
const player = this.getPlayer(); const player = this.getPlayer();
if (player.paused) { if (player.paused) {
this.play(); await this.play();
} else { } else {
this.pause(); this.pause();
} }
......
<ng-container *ngIf="current"> <ng-container *ngIf="current">
<m-video--direct-http-player <m-video--direct-http-player
*ngIf="current.type === 'direct-http'" *ngIf="current.type === 'direct-http' || true"
class="m-video--player" class="m-video--player"
[src]="current.src" [src]="current.src"
[poster]="poster" [poster]="poster"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
></m-video--direct-http-player> ></m-video--direct-http-player>
<m-video--torrent-player <m-video--torrent-player
*ngIf="current.type === 'torrent'" *ngIf="current.type === 'torrent' && false"
class="m-video--player" class="m-video--player"
[src]="current.src" [src]="current.src"
[poster]="poster" [poster]="poster"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<i <i
*ngIf=" *ngIf="
(!playerRef.isPlaying() && !playerRef.isLoading()) || (!playerRef.isPlaying() && !playerRef.isLoading()) ||
(isActivity && metadataLoaded && !playerRef.isPlaying()) (shouldPlayInModal && !playerRef.isPlaying())
" "
class="material-icons minds-video-play-icon" class="material-icons minds-video-play-icon"
(click)="clickedVideo()" (click)="clickedVideo()"
......
...@@ -435,9 +435,9 @@ export class MindsVideoComponent implements OnDestroy { ...@@ -435,9 +435,9 @@ export class MindsVideoComponent implements OnDestroy {
} }
clickedVideo() { clickedVideo() {
if (!this.metadataLoaded) { // if (!this.metadataLoaded) {
return; // return;
} // }
const isNotTablet = Math.min(screen.width, screen.height) < 768; const isNotTablet = Math.min(screen.width, screen.height) < 768;
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
[src]="[ [src]="[
{ {
res: '360', res: '360',
uri: 'api/v1/media/' + entity.entity_guid + '/play', uri: 'api/v1/media/' + entity.entity_guid + '/play?s=modal',
type: 'video/mp4' type: 'video/mp4'
} }
]" ]"
......
...@@ -170,6 +170,11 @@ m-overlay-modal { ...@@ -170,6 +170,11 @@ m-overlay-modal {
m-video { m-video {
position: static; position: static;
video {
width: 100%;
height: 100%;
}
.minds-video-bar-full { .minds-video-bar-full {
.m-video--progress-bar { .m-video--progress-bar {
padding-right: 0; padding-right: 0;
......
...@@ -151,8 +151,12 @@ export class MediaModalComponent implements OnInit, OnDestroy { ...@@ -151,8 +151,12 @@ export class MediaModalComponent implements OnInit, OnDestroy {
switch (this.entity.custom_type) { switch (this.entity.custom_type) {
case 'video': case 'video':
this.contentType = 'video'; this.contentType = 'video';
this.entity.width = this.entity.custom_data.dimensions.width; this.entity.width = this.entity.custom_data.dimensions
this.entity.height = this.entity.custom_data.dimensions.height; ? 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; this.entity.thumbnail_src = this.entity.custom_data.thumbnail_src;
break; break;
case 'batch': case 'batch':
......
...@@ -13,7 +13,7 @@ export class MessengerSounds { ...@@ -13,7 +13,7 @@ export class MessengerSounds {
}; };
play(sound: string) { play(sound: string) {
if (this.canPlay()) this.sounds[sound].play(); // if (this.canPlay()) this.sounds[sound].play();
} }
canPlay() { canPlay() {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
[src]="[ [src]="[
{ {
res: '360', res: '360',
uri: 'api/v1/media/' + entity.guid + '/play', uri: 'api/v1/media/' + entity.guid + '/play?s=tile',
type: 'video/mp4' type: 'video/mp4'
} }
]" ]"
......
...@@ -7,8 +7,8 @@ m-upgrades__buyTokens { ...@@ -7,8 +7,8 @@ m-upgrades__buyTokens {
.m-upgradesBuyTokens__wrapper { .m-upgradesBuyTokens__wrapper {
padding: 40px 60px 60px; padding: 40px 60px 60px;
background: url('http://placekitten.com/591/362') no-repeat right center background: url('<%= APP_CDN %>/assets/marketing/buytokens_bg.jpg')
#726061; no-repeat right center #726061;
background-size: contain; background-size: contain;
color: #ffffff; color: #ffffff;
......
...@@ -5,4 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; ...@@ -5,4 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: 'buy-tokens.component.html', templateUrl: 'buy-tokens.component.html',
}) })
export class BuyTokensComponent {} export class BuyTokensComponent {
readonly cdnAssetsUrl: string = window.Minds.cdn_assets_url;
}