File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 let videoConsent = JSON . parse ( localStorage . getItem ( consentKey ) || '{}' ) ;
1919
2020 function setConsent ( platform ) {
21+ // Vidstack eigenes Consent-System
2122 videoConsent [ platform ] = true ;
2223 localStorage . setItem ( consentKey , JSON . stringify ( videoConsent ) ) ;
2324 document . cookie = `${ platform } _consent=true; path=/; max-age=${ 30 * 24 * 60 * 60 } ; SameSite=Lax; Secure` ;
25+
26+ // Optional: Consent Manager Logging (falls installiert)
27+ if ( typeof consent_manager_util !== 'undefined' ) {
28+ // Nutze Standard-UIDs: 'youtube' oder 'vimeo'
29+ try {
30+ // API Call für DSGVO-konformes Logging
31+ fetch ( '?rex-api-call=consent_manager_inline_log' , {
32+ method : 'POST' ,
33+ headers : {
34+ 'Content-Type' : 'application/x-www-form-urlencoded' ,
35+ } ,
36+ body : new URLSearchParams ( {
37+ service : platform ,
38+ consent_type : 'inline' ,
39+ source : 'vidstack'
40+ } )
41+ } ) . catch ( err => console . warn ( 'Vidstack: Consent Manager Logging fehlgeschlagen' , err ) ) ;
42+
43+ // Consent Manager Cookie setzen (parallel zu Vidstack)
44+ consent_manager_util . set_consent ( platform ) ;
45+ } catch ( e ) {
46+ console . warn ( 'Vidstack: Consent Manager Integration Fehler' , e ) ;
47+ }
48+ }
2449 }
2550
2651 function hasConsent ( platform ) {
You can’t perform that action at this time.
0 commit comments