- let items: { icon?: string, label: string, listener: Function }[] = []
-
- if (!playlist) {
- const isLoopEnabled = player.options_['loop']
- items = items.concat([
- {
- icon: 'repeat',
- label: player.localize('Play in loop') + (isLoopEnabled ? '<span class="vjs-icon-tick-white"></span>' : ''),
- listener: function () {
- player.options_['loop'] = !isLoopEnabled
- }
- },
- {
- label: player.localize('Copy the video URL'),
- listener: function () {
- copyToClipboard(buildVideoLink())
- }
- },
- {
- label: player.localize('Copy the video URL at the current time'),
- listener: function (this: videojs.Player) {
- copyToClipboard(buildVideoLink({ startTime: this.currentTime() }))
- }
+ const isLoopEnabled = player.options_['loop']
+ const items = [
+ {
+ icon: 'repeat',
+ label: player.localize('Play in loop') + (isLoopEnabled ? '<span class="vjs-icon-tick-white"></span>' : ''),
+ listener: function () {
+ player.options_['loop'] = !isLoopEnabled