diff options
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r-- | client/src/assets/player/utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 6767459ce..d7451fa1d 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { VideoFile } from '@shared/models' | 1 | import { VideoFile } from '@shared/models' |
2 | import { escapeHTML } from '@shared/core-utils/renderer' | ||
2 | 3 | ||
3 | function toTitleCase (str: string) { | 4 | function toTitleCase (str: string) { |
4 | return str.charAt(0).toUpperCase() + str.slice(1) | 5 | return str.charAt(0).toUpperCase() + str.slice(1) |
@@ -170,9 +171,11 @@ function secondsToTime (seconds: number, full = false, symbol?: string) { | |||
170 | return time | 171 | return time |
171 | } | 172 | } |
172 | 173 | ||
173 | function buildVideoOrPlaylistEmbed (embedUrl: string) { | 174 | function buildVideoOrPlaylistEmbed (embedUrl: string, embedTitle: string) { |
175 | const title = escapeHTML(embedTitle) | ||
174 | return '<iframe width="560" height="315" ' + | 176 | return '<iframe width="560" height="315" ' + |
175 | 'sandbox="allow-same-origin allow-scripts allow-popups" ' + | 177 | 'sandbox="allow-same-origin allow-scripts allow-popups" ' + |
178 | 'title="' + title + '" ' + | ||
176 | 'src="' + embedUrl + '" ' + | 179 | 'src="' + embedUrl + '" ' + |
177 | 'frameborder="0" allowfullscreen>' + | 180 | 'frameborder="0" allowfullscreen>' + |
178 | '</iframe>' | 181 | '</iframe>' |