<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden
- [value]="getPlaylistIframeCode()" (change)="updateEmbedCode()"
+ [value]="customizations.onlyEmbedUrl ? getPlaylistEmbedUrl() : getPlaylistIframeCode()" (change)="updateEmbedCode()"
[withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
></my-input-toggle-hidden>
<div class="filters">
<div class="form-group" *ngIf="video">
- <my-peertube-checkbox inputName="includeVideoInPlaylist" [(ngModel)]="includeVideoInPlaylist" i18n-labelText
- labelText="Share the playlist at this video position"></my-peertube-checkbox>
+ <my-peertube-checkbox
+ inputName="includeVideoInPlaylist" [(ngModel)]="includeVideoInPlaylist"
+ i18n-labelText labelText="Share the playlist at this video position"
+ ></my-peertube-checkbox>
+ </div>
+
+ <div class="form-group">
+ <my-peertube-checkbox
+ *ngIf="isInPlaylistEmbedTab()"
+ inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
+ i18n-labelText labelText="Only display embed URL"
+ ></my-peertube-checkbox>
</div>
</div>
<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden
- [value]="getVideoIframeCode()" (ngModelChange)="updateEmbedCode()"
+ [value]="customizations.onlyEmbedUrl ? getVideoEmbedUrl() : getVideoIframeCode()" (ngModelChange)="updateEmbedCode()"
[withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
></my-input-toggle-hidden>
</select>
</div>
</div>
+
+ <div class="form-group">
+ <my-peertube-checkbox
+ *ngIf="isInVideoEmbedTab()"
+ inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
+ i18n-labelText labelText="Only display embed URL"
+ ></my-peertube-checkbox>
+ </div>
</div>
<div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
></my-peertube-checkbox>
</div>
- <div *ngIf="!isLocalVideo() && !isVideoInEmbedTab()" class="form-group">
+ <div *ngIf="!isLocalVideo() && !isInVideoEmbedTab()" class="form-group">
<my-peertube-checkbox
inputName="originUrl" [(ngModel)]="customizations.originUrl"
i18n-labelText labelText="Use origin instance URL"
</div>
</div>
- <ng-container *ngIf="isVideoInEmbedTab()">
+ <ng-container *ngIf="isInVideoEmbedTab()">
<div class="form-group">
<my-peertube-checkbox
inputName="title" [(ngModel)]="customizations.title"
muted: boolean
embedP2P: boolean
+ onlyEmbedUrl: boolean
title: boolean
warningTitle: boolean
controls: boolean
autoplay: false,
muted: false,
- embedP2P: this.server.getHTMLConfig().defaults.p2p.embed.enabled,
-
// Embed options
+ embedP2P: this.server.getHTMLConfig().defaults.p2p.embed.enabled,
+ onlyEmbedUrl: false,
title: true,
warningTitle: true,
controls: true,
}
getVideoIframeCode () {
- const embedUrl = decorateVideoLink({ url: this.video.embedUrl, ...this.getVideoOptions(true) })
+ return buildVideoOrPlaylistEmbed(this.getVideoEmbedUrl(), this.video.name)
+ }
- return buildVideoOrPlaylistEmbed(embedUrl, this.video.name)
+ getVideoEmbedUrl () {
+ return decorateVideoLink({ url: this.video.embedUrl, ...this.getVideoOptions(true) })
}
- getPlaylistIframeCode () {
- const embedUrl = decoratePlaylistLink({ url: this.playlist.embedUrl, ...this.getPlaylistOptions() })
+ getPlaylistEmbedUrl () {
+ return decoratePlaylistLink({ url: this.playlist.embedUrl, ...this.getPlaylistOptions() })
+ }
- return buildVideoOrPlaylistEmbed(embedUrl, this.playlist.displayName)
+ getPlaylistIframeCode () {
+ return buildVideoOrPlaylistEmbed(this.getPlaylistEmbedUrl(), this.playlist.displayName)
}
getVideoUrl () {
return window.location.protocol === 'http:'
}
- isVideoInEmbedTab () {
+ isInVideoEmbedTab () {
return this.activeVideoId === 'embed'
}
+ isInPlaylistEmbedTab () {
+ return this.activePlaylistId === 'embed'
+ }
+
isLocalVideo () {
return this.video.isLocal
}