1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Merge branch 'release/7.2.0' into develop

This commit is contained in:
Chocobozzz 2025-07-10 15:36:20 +02:00
commit 015a324fad
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 29 additions and 9 deletions

View file

@ -84,7 +84,7 @@
"debug": "^4.3.1",
"dompurify": "^3.1.6",
"expect-webdriverio": "^5.1.0",
"hls.js": "~1.5.11",
"hls.js": "~1.6.7",
"intl-messageformat": "^10.1.0",
"jschannel": "^1.0.2",
"linkify-html": "^4.0.2",

View file

@ -1,8 +1,18 @@
import { CommonModule } from '@angular/common'
import { Component, OnInit, forwardRef, inject, input, viewChild } from '@angular/core'
import {
Component,
EnvironmentInjector,
OnInit,
afterNextRender,
forwardRef,
inject,
input,
runInInjectionContext,
viewChild
} from '@angular/core'
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
import { DragDropDirective } from '@app/+videos-publish-manage/+video-publish/shared/drag-drop.directive'
import { ServerService } from '@app/core'
import { Notifier, ServerService } from '@app/core'
import { ReactiveFileComponent } from '@app/shared/shared-forms/reactive-file.component'
import { BytesPipe } from '@app/shared/shared-main/common/bytes.pipe'
import { EmbedComponent } from '@app/shared/shared-main/video/embed.component'
@ -27,6 +37,8 @@ import { VideoEdit } from './video-edit.model'
})
export class ThumbnailManagerComponent implements OnInit, ControlValueAccessor {
private serverService = inject(ServerService)
private notifier = inject(Notifier)
private environmentInjector = inject(EnvironmentInjector)
readonly embed = viewChild<EmbedComponent>('embed')
@ -119,8 +131,16 @@ export class ThumbnailManagerComponent implements OnInit, ControlValueAccessor {
selectFromVideo () {
this.selectingFromVideo = true
setTimeout(() => {
this.player = new PeerTubePlayer(this.embed().getIframe())
runInInjectionContext(this.environmentInjector, () => {
afterNextRender(() => {
try {
this.player = new PeerTubePlayer(this.embed().getIframe())
} catch (err) {
this.notifier.error('Error creating PeerTube embed: ' + err.message)
this.selectingFromVideo = false
return
}
})
})
}

View file

@ -5558,10 +5558,10 @@ headers-utils@^1.2.0:
resolved "https://registry.yarnpkg.com/headers-utils/-/headers-utils-1.2.5.tgz#899d6a76b21bcbe18d6108f56136fdbd4f30c404"
integrity sha512-DAzV5P/pk3wTU/8TLZN+zFTDv4Xa1QDTU8pRvovPetcOMbmqq8CwsAvZBLPZHH6usxyy31zMp7I4aCYb6XIf6w==
hls.js@~1.5.11:
version "1.5.20"
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.5.20.tgz#7eb23bb5e2595311d4e2761038ca6882673de7e2"
integrity sha512-uu0VXUK52JhihhnN/MVVo1lvqNNuhoxkonqgO3IpjvQiGpJBdIXMGkofjQb/j9zvV7a1SW8U9g1FslWx/1HOiQ==
hls.js@~1.6.7:
version "1.6.7"
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.6.7.tgz#1b45ed55dfc92e06edc15b98e6374bd13f78af65"
integrity sha512-QW2fnwDGKGc9DwQUGLbmMOz8G48UZK7PVNJPcOUql1b8jubKx4/eMHNP5mGqr6tYlJNDG1g10Lx2U/qPzL6zwQ==
hmac-drbg@^1.0.1:
version "1.0.1"