La ricerca sarà presto disponibile in italiano, per favore scrivi in Inglese.

Grand
David

Biografia

Grand David was born in montpellier but lives in Paris and Berlin. he plays all kind of intruments and is a real one-man band of the 21st century.
His Paris loft is all 70's furnished and is as well a "vintage" recording studio full of old organs, synthesizers, vocodeurs, effects and other old intruments. le Grand David is mad about sounds that grinds.

As well keen on movie soundtracks and sound illustration, he is the heir of musicians like Francois de Roubaix, Roger Roger or Raymond Scott.

https://myspace.com/granddavid

Album Titolo Alt. Durata Compositore/Artista Descrizione Parole chiave Key BPM
CEZ4653 Bassline Bender
[CEZ4653 - 6]
18 1'45 Grand David Big Beat. 1990s. Fiery, brash & exciting. Male vocals, bouncy bass, ... action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Alternate
[CEZ4653 - 85]
0 1'45 David Rieu Instrumental version action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 1 (60 ...
[CEZ4653 - 86]
0 1'00 David Rieu 60 second cut action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 2 (60 ...
[CEZ4653 - 87]
0 1'00 David Rieu 60 second instrumental cut action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 3 (60 ...
[CEZ4653 - 88]
0 1'00 David Rieu 60 second cut 2 action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 4 (60 ...
[CEZ4653 - 89]
0 1'00 David Rieu 60 second instrumental cut 2 action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 5 (30 ...
[CEZ4653 - 90]
0 0'30 David Rieu 30 second cut action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 6 (30 ...
[CEZ4653 - 91]
0 0'30 David Rieu 30 second instrumental cut action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 7 (30 ...
[CEZ4653 - 92]
0 0'30 David Rieu 30 second cut 2 action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 8 (30 ...
[CEZ4653 - 93]
0 0'30 David Rieu 30 second instrumental cut 2 action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 9 (15 ...
[CEZ4653 - 94]
0 0'15 David Rieu 15 second cut action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 10 (15 ...
[CEZ4653 - 95]
0 0'15 David Rieu 15 second instrumental cut action movie big beat fiery team sport ... Bbm 130
CEZ4653 Bassline Bender Edit 11 (15 ...
[CEZ4653 - 96]
0 0'15 David Rieu 15 second cut 2 action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 12 (15 ...
[CEZ4653 - 97]
0 0'15 David Rieu 15 second instrumental cut 2 action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 13 ...
[CEZ4653 - 98]
0 0'09 David Rieu Sting 1 action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 14 ...
[CEZ4653 - 99]
0 0'09 David Rieu Sting instrumental 1 action movie big beat fiery team sport ... Bbm 131
CEZ4653 Bassline Bender Edit 15 ...
[CEZ4653 - 100]
0 0'09 David Rieu Sting 2 action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 16 ...
[CEZ4653 - 101]
0 0'09 David Rieu Sting instrumental 2 action movie big beat fiery team sport ... Bbm 129
CEZ4653 Bassline Bender Edit 17 ...
[CEZ4653 - 102]
0 0'09 David Rieu Sting 3 action movie big beat fiery team sport ... Bbm 130
CEZ4653 Smashing Funk Masters
[CEZ4653 - 4]
13 2'16 Grand David Big Beat. 1990s. Zany, lively & joyful. Male & female voices, rock ... advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters ...
[CEZ4653 - 59]
0 2'16 David Rieu Instrumental version advertising breakbeat fiery quirky ... Gm 134
CEZ4653 Smashing Funk Masters Edit 1 ...
[CEZ4653 - 60]
0 1'00 David Rieu 60 second cut advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters Edit 2 ...
[CEZ4653 - 61]
0 1'00 David Rieu 60 second instrumental cut advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters Edit 3 ...
[CEZ4653 - 62]
0 0'30 David Rieu 30 second cut advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters Edit 4 ...
[CEZ4653 - 63]
0 0'30 David Rieu 30 second instrumental cut advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters Edit 5 ...
[CEZ4653 - 64]
0 0'15 David Rieu 15 second cut advertising breakbeat fiery quirky ... Dm 134
CEZ4653 Smashing Funk Masters Edit 6 ...
[CEZ4653 - 65]
0 0'15 David Rieu 15 second instrumental cut advertising breakbeat fiery quirky ... D 134
CEZ4653 Smashing Funk Masters Edit 7 ...
[CEZ4653 - 66]
0 0'07 David Rieu Sting 1 advertising breakbeat fiery quirky ... Am 135
CEZ4653 Smashing Funk Masters Edit 8 ...
[CEZ4653 - 67]
0 0'07 David Rieu Sting instrumental 1 advertising breakbeat fiery quirky ... Cm 134
CEZ4653 Smashing Funk Masters Edit 9 ...
[CEZ4653 - 68]
0 0'09 David Rieu Sting 2 advertising breakbeat fiery quirky ... Am 134
CEZ4653 Smashing Funk Masters Edit 10 ...
[CEZ4653 - 69]
0 0'09 David Rieu Sting instrumental 2 advertising breakbeat fiery quirky ... Am 133
CEZ4653 Smashing Funk Masters Edit 11 ...
[CEZ4653 - 70]
0 0'08 David Rieu Sting 3 advertising breakbeat fiery quirky ... Am 133
CEZ4653 Smashing Funk Masters Edit 12 ...
[CEZ4653 - 71]
0 0'08 David Rieu Sting 3 instrumental advertising breakbeat fiery quirky ... Am 134
CEZ4652 Hula Hoop Carnival Collision
[CEZ4652 - 5]
11 1'59 Grand David Big Beat. 1990s in a 1960s mood. Funky, playful & colourful. Shouts, ... big beat chase funny lively ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 55]
0 1'59 David Rieu Instrumental version big beat driving lively fiery ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 56]
0 1'00 David Rieu 60 second cut big beat driving lively fiery ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 57]
0 1'00 David Rieu 60 second instrumental cut big beat driving lively fiery ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 58]
0 0'30 David Rieu 30 second cut big beat driving lively fiery ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 59]
0 0'30 David Rieu 30 second instrumental cut big beat driving lively fiery ... Bbm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 60]
0 0'15 David Rieu 15 second cut big beat driving lively fiery ... Ebm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 61]
0 0'15 David Rieu 15 second instrumental cut big beat driving lively fiery ... Ebm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 62]
0 0'07 David Rieu Sting 1 big beat driving lively fiery ... Ebm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 63]
0 0'09 David Rieu Sting instrumental 1 big beat driving lively fiery ... Ebm 122
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 64]
0 0'09 David Rieu Sting 2 big beat driving lively fiery ... Ebm 123
CEZ4652 Hula Hoop Carnival Collision ...
[CEZ4652 - 65]
0 0'09 David Rieu Sting instrumental 2 big beat driving lively fiery ... Bbm 123
CEZ4555 Let's Stick Together
[CEZ4555 - 18]
1 2'34 Grand David Disco, chill groove. Relaxed, positive & groovy. Violins, rhythm, ... confident carefree kitsch & cheesy retro American serie ... Am 117
CEZ4555 Let's Stick Together Alternate
[CEZ4555 - 23]
0 2'34 David Rieu No vocoder alternative version. confident carefree kitsch & cheesy retro American serie ... Am 117
CEZ4555 Call me Baby
[CEZ4555 - 16]
1 2'25 Grand David Disco. Danceable, happy & groovy. Rhythm, bass, guitars, vintage ... confident driving disco lively ... Em 126
CEZ4555 Call me Baby Alternate
[CEZ4555 - 22]
0 2'25 David Rieu No Sampled vocal alternative version. confident driving disco lively ... Em 126
CEZ4555 Bip Bip Dance
[CEZ4555 - 8]
1 2'27 Grand David 70s disco funk. Danceable, cheerful & enthusiastic. Rhythm, bass, ... catchy confident disco funk ... Cm 116
CEZ4555 Bip Bip Dance Alternate
[CEZ4555 - 20]
0 2'28 David Rieu No Sampled vocal alternative version. catchy confident disco funk ... Cm 116
CEZ4555 Groovorama
[CEZ4555 - 1]
0 2'09 Grand David Organ groove, 70s funk, space groove. Festive, determined & playful. ... blaxploitation driving funk danceable ... Em 109
CEZ4555 Funktastic
[CEZ4555 - 13]
0 2'39 Grand David 70s funk. Groovy, cheerful, organic & rhythmic. Rhythm, bass, funky ... happy & joyful driving lively carefree ... Am 110
CEZ4555 Stick to the Move
[CEZ4555 - 3]
0 2'16 Grand David Organ groove, 70s funk. Positive, groovy & festive. Funky drummer, ... happy & joyful funk funny blaxploitation ... Em 98
CEZ4555 Super Styler
[CEZ4555 - 14]
1 2'16 Grand David 70s funk. Saccadic, groovy and catchy. Vocoder, rhythm section, funk ... funk 1970 blooper confident ... Bbm 118
CEZ4555 Super Styler Alternate
[CEZ4555 - 21]
0 2'15 David Rieu No vocoder alternative version. funk 1970 blooper confident ... Cm 118
CEZ4555 Groove Licence
[CEZ4555 - 6]
0 2'27 Grand David Organ groove, shuffle funk & vintage groove. Determined (moving ... blooper confident funk lively ... Cm 130
CEZ4556 Organic Groove
[CEZ4556 - 7]
1 2'28 Grand David Funky, 80s. Groovy, repetitive, powerful & danceable. Slap bass, ... lively funk catchy driving ... Gbm 116
CEZ4556 Organic Groove Alternate
[CEZ4556 - 23]
0 2'28 Grand David Instrumental Version without FX. lively funk catchy driving ... Gbm 116
CEZ4556 Miami Funk Machine
[CEZ4556 - 13]
1 3'25 Grand David Funk, 80s, Analog synth funk. Powerful, playful, efficient & ... retro American serie driving confident funk ... Am 116
CEZ4556 Miami Funk Machine Alternate
[CEZ4556 - 28]
0 2'48 Grand David Instrumental Version. 1980 funk danceable daytime TV ... Cm 110
CEZ4556 It Must Be Love
[CEZ4556 - 4]
1 2'47 Grand David Funk, 80s, California funk, West Coast. Sunny, joyful, catchy & ... fashion 1980 daytime TV advertising ... Bm 112
CEZ4556 It Must Be Love Alternate
[CEZ4556 - 18]
0 2'47 Grand David Instrumental Version. fashion 1980 daytime TV advertising ... Bm 112
CEZ4556 Funk the Night Away
[CEZ4556 - 14]
0 2'48 Grand David Funky, 80s. Danceable, lazy & attitude. Synth bass, clavinet, vocoder ... 1980 funk danceable daytime TV ... Cm 110
CEZ4500 I Wanna Tell You
[CEZ4500 - 7]
1 2'09 Grand David Parole ... Motown. 60s. Bouncy, positive & lively. Stirring. Female singer, ... motown confident carefree pop song ... Am 100
CEZ4500 I Wanna Tell You Alternate
[CEZ4500 - 62]
0 2'08 Grand David Instrumental version. motown confident carefree pop song ... C 100
CEZ4501 Fun and Games
[CEZ4501 - 10]
0 2'24 Grand David Electronic jerk, 60's beat. Urgent, fun & happy. Suggested for ... lively catchy happy & joyful 1960 ... Em 150
CEZ4490 Blaxploitation Beat
[CEZ4490 - 1]
0 2'30 Grand David Retro big beat in a 60's, 70's UK sound. Intro with brass hook, ... big beat blaxploitation chase driving ... Dbm 124
CEZ4490 Royal Flush
[CEZ4490 - 11]
1 2'35 Grand David Retro big beat in a 70's style / blaxploitation. Dynamic with ... blaxploitation percussive English retro TV serie driving ... Cm 120
CEZ4490 Royal Flush Alternate
[CEZ4490 - 22]
0 2'36 Grand David Instrumental version. Retro big beat in a 70's style / ... blaxploitation percussive driving rhythm section ... Cm 120
CEZ4473 A Girl Like Me
[CEZ4473 - 11]
2 2'18 Grand David Parole ... Catchy, optimist & confident. Female singer, backing vocals, organ, ... confident soul catchy happy & joyful ... C 100
CEZ4473 A Girl Like Me (Alternate 1)
[CEZ4473 - 38]
0 2'18 Grand David Underscore. Catchy, optimist & confident. Organ, brass, strings, ... confident soul catchy happy & joyful ... C 100
CEZ4473 A Girl Like Me (Alternate 2)
[CEZ4473 - 39]
0 2'18 Grand David Instrumental version. Catchy, optimist & confident. Organ, brass, ... confident soul catchy happy & joyful ... C 100
CEZ4473 Working Girl
[CEZ4473 - 4]
1 3'32 Grand David Parole ... Northern soul. Confident, positive & catchy. Female singer, backing ... happy & joyful soul confident lively ... Cm 130
CEZ4473 Working Girl (Alternate)
[CEZ4473 - 26]
0 3'32 Grand David Underscore. Soul in a 60's mood. Northern soul. Confident, positive & ... happy & joyful soul confident lively ... Cm 130
CEZ4473 It's All Over Now
[CEZ4473 - 7]
2 2'12 Grand David Parole ... Soul, motown. Sentimental, cheesy & nostalgique. Female singer, ... motown soul female singer sentimental ... Gm 147
CEZ4473 It's All Over Now (Alternate ...
[CEZ4473 - 30]
0 2'12 Grand David Underscore. Soul, motown. Sentimental, cheesy & nostalgique. Piano, ... motown soul sentimental series ... Bb 74
CEZ4473 It's All Over Now (Alternate ...
[CEZ4473 - 31]
0 2'12 Grand David Instrumental version. Soul, Motown. Sentimental, cheesy & ... motown soul sentimental series ... Bb 74
CEZ4473 Tonight
[CEZ4473 - 5]
1 2'54 Grand David, Mister Fluo Parole ... Piano intro. Driving & confident with a touch of melancholy. Female ... confident driving lively catchy ... Dm 124
CEZ4473 Tonight (Alternate)
[CEZ4473 - 27]
0 2'54 Grand David, Mister Fluo Underscore. Piano intro. Driving & confident with a touch of ... confident driving lively catchy ... Dm 124
CEZ4473 Middle of the Night
[CEZ4473 - 17]
2 3'05 Grand David Parole ... Soul ballad, slow. Intro with snare drum roll. Sentimental, relaxed & ... ballad soul swaying female singer ... C 66
CEZ4473 Middle of the Night ...
[CEZ4473 - 49]
0 3'01 Grand David Underscore. Soul ballad, slow. Intro with snare drum roll. ... ballad soul swaying relaxed ... C 66
CEZ4473 Middle of the Night ...
[CEZ4473 - 50]
0 3'04 Grand David Instrumental version. Soul ballad, slow. Intro with snare drum roll. ... ballad soul swaying relaxed ... C 66
CEZ4473 I Can't Wait for You
[CEZ4473 - 14]
2 2'16 Grand David Parole ... Motown, soul. Sensual, confident & relaxed with attitude. Female ... soul catchy confident relaxed ... Am 112
CEZ4473 I Can't Wait for You ...
[CEZ4473 - 44]
0 2'15 Grand David Underscore. Motown, soul. Sensual, confident & relaxed. Brass, ... soul catchy confident relaxed ... Am 112
CEZ4473 I Can't Wait for You ...
[CEZ4473 - 45]
0 2'15 Grand David Instrumental version. Motown, soul. Sensual, confident & relaxed. ... soul catchy confident relaxed ... Am 112
CEZ4473 I Love U
[CEZ4473 - 8]
3 2'14 Grand David Parole ... Pop ballad in a 60's mood. Sentimental, romantic & tender. Swaying. ... romantic comedy motown charming pop backing vocals ... Am 122
CEZ4473 I Love U (Alternate 1)
[CEZ4473 - 32]
0 2'14 Grand David Underscore. Pop ballad in a 60's mood. Sentimental, romantic & ... romantic comedy charming confident motown ... G 120
CEZ4473 I Love U (Alternate 2)
[CEZ4473 - 33]
0 2'14 Grand David Instrumental version. Pop ballad in a 60's mood. Sentimental, ... romantic comedy charming confident motown ... G 120
CEZ4473 I Love U (Alternate 3)
[CEZ4473 - 34]
0 2'14 Grand David Instrumental version. Pop ballad in a 60's mood. Sentimental, ... romantic comedy charming confident motown ... G 120
CEZ4473 I Want to Be your Lover
[CEZ4473 - 10]
2 1'59 Grand David Parole ... Motown ballad, northern soul. Sentimental, nostalgic & tender. Female ... motown sentimental series catchy ... G 120
CEZ4473 I Want to Be Your Lover ...
[CEZ4473 - 36]
0 1'59 Grand David Underscore. Motown ballad, northern soul. Sentimental, nostalgic & ... motown sentimental series catchy ... Am 120
CEZ4473 I Want to Be Your Lover ...
[CEZ4473 - 37]
0 1'58 Grand David Instrumental version. Motown ballad, Northern soul. Sentimental, ... motown sentimental series catchy ... G 120
CEZ4473 You Make Me Feel Good
[CEZ4473 - 18]
1 2'49 Grand David Parole ... Slow, soul ballad. Relaxed, tender & kitsch. Nostalgic. Female singer ... kitsch & cheesy relaxed ballad sentimental ... D 89
CEZ4473 You make me Feel Good ...
[CEZ4473 - 51]
0 2'49 Grand David Instrumental version. Slow, soul ballad. Relaxed, tender & kitsch. ... kitsch & cheesy relaxed ballad sentimental ... D 90
CEZ4473 Give me a Reason
[CEZ4473 - 15]
2 2'24 Grand David Parole ... Love song, soul. Tender, sweet & sentimental. Female singer, backing ... sentimental soul carefree advertising ... A 84
CEZ4473 Give me a Reason (Alternate 1)
[CEZ4473 - 46]
0 2'24 Grand David Underscore. Love soul. Tender, sweet & sentimental. Strings, organ, ... sentimental soul carefree advertising ... A 84
CEZ4473 Give me a Reason (Alternate 2)
[CEZ4473 - 47]
0 2'24 Grand David Instrumental version. Love soul. Love song, soul. Tender, sweet & ... sentimental soul carefree advertising ... A 84
CEZ4473 Everybody Needs Somebody
[CEZ4473 - 9]
1 1'58 Grand David, Mister Fluo Parole ... Ska. Playful, upbeat & catchy with attitude. Female singer, baryton ... lively festive happy & joyful open air ... D 121
CEZ4473 Everybody Needs Somebody ...
[CEZ4473 - 35]
0 1'58 Grand David, Mister Fluo Instrumental version. Ska. Playful, upbeat & catchy. Baryton sax, ... ska lively festive happy & joyful ... Em 121
CEZ4473 I Wanna Tell You
[CEZ4473 - 1]
3 2'08 Grand David Parole ... Motown, soul, pop in a 60's mood. Upbeat, playful & catchy. Female ... lively happy & joyful motown catchy ... Am 100
CEZ4473 I Wanna Tell You (Alternate 1)
[CEZ4473 - 19]
0 2'08 Grand David X-Mas version. Motown, soul, pop in a 60's mood. Upbeat, playful & ... lively happy & joyful motown catchy ... C 100
CEZ4473 I Wanna Tell You (Alternate ...
[CEZ4473 - 20]
0 2'08 Grand David Motown, soul, pop in a 60's mood. Upbeat, playful & catchy. Guitar, ... lively happy & joyful motown catchy ... C 100
CEZ4473 I Wanna Tell You (Alternate 3)
[CEZ4473 - 21]
0 2'08 Grand David Underscore. Motown, soul, pop in a 60's mood. Upbeat, playful & ... lively happy & joyful motown catchy ... C 100
CEZ4473 Dance with You
[CEZ4473 - 16]
1 2'40 Grand David Parole ... Disco, groove in a 70's style. Upbeat, dynamic & bouncy with ... catchy disco danceable festive ... Am 117
CEZ4473 Dance with You (Alternate)
[CEZ4473 - 48]
0 2'37 Grand David Instrumental version. Disco, groove in a 70's style. Upbeat, dynamic ... catchy danceable disco lively ... Am 117
CEZ4473 Lookin For a Lover
[CEZ4473 - 13]
2 2'42 Grand David Parole ... Love song, british soul. Romantic, heartful & sentimental. Female ... contemporary soul motown confident lively ... Cm 125
CEZ4473 Lookin For a Lover (Alternate ...
[CEZ4473 - 42]
0 2'42 Grand David Underscore. Love song, British soul. Romantic, heartful & ... contemporary soul catchy sentimental series ... Gm 125
CEZ4473 Lookin For a Lover (Alternate ...
[CEZ4473 - 43]
0 2'42 Grand David Instrumental version. Love song, British soul. Romantic, heartful & ... contemporary soul catchy pop song sentimental ... Gm 124
CEZ4473 Move Your Feet
[CEZ4473 - 6]
2 2'31 Grand David Parole ... Jerk, twist. Punchy, driving & bouncy. Break @ 1'24. Female singer, ... lively happy & joyful festive attitude ... B 150
CEZ4473 Move Your Feet (Alternate 1)
[CEZ4473 - 28]
0 2'30 Grand David Underscore. Jerk, twist. Punchy, driving & bouncy. Break @ 1'24. ... happy & joyful lively festive beds ... E 151
CEZ4473 Move Your Feet (Alternate 2)
[CEZ4473 - 29]
0 2'31 Grand David Instrumental version. Jerk, twist. Punchy, driving & bouncy. Break @ ... lively happy & joyful festive catchy ... E 150
CEZ4473 You're my Lucky Number
[CEZ4473 - 2]
2 2'07 Grand David Parole ... Soul in a 60's-70's mood. Driving, bouncy & catchy. Female singer, ... soul catchy lively happy & joyful ... C 129
CEZ4473 You're my Lucky Number ...
[CEZ4473 - 22]
0 2'07 Grand David Underscore. Soul in a 60's-70's mood. Driving, bouncy & catchy. Brass ... catchy lively happy & joyful motown ... C 129
CEZ4473 You're my Lucky Number ...
[CEZ4473 - 23]
0 2'07 Grand David Instrumental version. Soul in a 60's-70's mood. Driving, bouncy & ... catchy lively happy & joyful motown ... C 129
CEZ4473 Nothing Without You
[CEZ4473 - 3]
2 2'33 Grand David Parole ... Soul in a 60's rhythm & blues track. Driving, playful & catchy. ... lively happy & joyful catchy driving ... Em 125
CEZ4473 Nothing Without You ...
[CEZ4473 - 24]
0 2'33 Grand David Underscore. Soul in a 60's mood. Driving, playful & catchy. Hammond ... lively happy & joyful catchy driving ... Em 124
CEZ4473 Nothing Without You ...
[CEZ4473 - 25]
0 2'33 Grand David Underscore. Soul in a 60's mood. Driving, playful & catchy. Hammond ... lively happy & joyful catchy driving ... D 124
CEZ4473 I'm Waiting for You
[CEZ4473 - 12]
2 1'59 Grand David Parole ... Soul bossa. Confident, optimist & relax. Female singer, backing ... advertising confident open air female singer ... Gbm 86
CEZ4473 I'm Waiting for You ...
[CEZ4473 - 40]
0 1'58 Grand David Underscore. Soul bossa. Confident, optimist & relax. Acoustic guitar, ... advertising confident happy & joyful open air ... Em 86
CEZ4473 I'm Waiting for You ...
[CEZ4473 - 41]
0 1'58 Grand David Instrumental version. Soul bossa. Confident, optimist & relax. Organ, ... advertising confident happy & joyful open air ... Em 86
CEG5030 Foxy Brown
[CEG5030 - 5]
0 1'51 Grand David Cool, swaying, sneaky & sensual. Like walking with attitude in a 70's ... mysterious film noir relaxed 1960 ... Em 105
CEG5030 Black Gumshoe
[CEG5030 - 2]
0 2'33 Grand David Determined, driving & urgent. Blaxploitation. Woodwind, brass, ... blaxploitation retro American serie driving spy ... Gm 150
CEZ4427 Assignment : Earth
[CEZ4427 - 21]
0 1'19 Grand David Psyché rock & electro pop. Lazy, positive & confident. Electric ... clumsy psychedelia funny swaying ... C 94
CEZ4400 Un Caïd en Cavale
[CEZ4400 - 2]
0 3'27 David Rieu 70's TV series. Urgent & determined. Pop from the 70's. Strings, ... French cinema driving 1960 France ... Cm 109
CEZ4400 Poulets à Gogo
[CEZ4400 - 6]
0 2'20 David Rieu 70's TV series. Jazzy, exotic, nocturnal & determined. Brass, flute, ... cinematic jazz film noir jazz club kitsch & cheesy ... Cm 140
CEZ4400 Le Gang des Docks
[CEZ4400 - 1]
0 3'04 David Rieu 70's detective series. Funky & groovy. Determined but lazy. ... 1970 driving retro American serie B movie ... Dm 110
CEZ4400 Micmac Est-Ouest
[CEZ4400 - 13]
0 3'01 David Rieu 70's TV spy series. Suspense. Groovy, mysterious & funky. Cymbalom, ... investigation 1970 crime movie opening credits TV ... Cm 99
CEZ4400 Dernier Homicide Connu
[CEZ4400 - 10]
0 3'00 David Rieu 70's TV spy series. Eastern Europe. Sad & melancholic. Rhythm, ... 1970 crime movie opening credits TV French TV serie ... Bbm 106
CEZ4399 Les Auto Tamponneuses
[CEZ4399 - 6]
0 2'44 David Rieu 70's comedy series & cartoon. Funny, quirky, kitsch & joyful. Vintage ... animation & cartoons kitsch & cheesy comical 1970 ... Bb 178
CEZ4399 En Cascades
[CEZ4399 - 1]
0 2'16 David Rieu 70's. Psychedelic. Joyful, fun, quirky & dancing. retro synth, organ, ... French retro comedy 1970 animation & cartoons lively ... Ebm 156
CEZ4399 Les Pistonnes des Faubourgs
[CEZ4399 - 11]
0 3'04 David Rieu 60's & 70's French TV series. Joyful, fun & kitsch. Synth, piano, ... French retro comedy 1970 kitsch & cheesy driving ... F 88
CEZ4382 Super Zéro
[CEZ4382 - 13]
2 2'49 Grand David Parole ... Funk / disco. Funny, catchy & lively. Electric keyboard, bass, synth, ... catchy funk funny sung French ... Cm 125
CEZ4382 Super Zéro Alternate 1 ...
[CEZ4382 - 27]
0 2'49 Grand David Funk / disco. Funny, catchy & lively. Electric keyboard, bass, synth, ... funny funk confident daytime TV ... Cm 125
CEZ4382 Super Zéro Alternate 2 ...
[CEZ4382 - 28]
0 2'49 Grand David Parole ... Funk / disco. Funny, catchy & lively. Electric keyboard, bass, synth, ... funny funk male singer confident ... Cm 125
CEZ4382 Mi Corazon
[CEZ4382 - 2]
1 2'38 Grand David Parole ... Disco / pop song. Driving, catchy & fiery. Acoustic guitar, bass, ... disco lively open air catchy ... Abm 110
CEZ4382 Mi Corazon Alternate
[CEZ4382 - 16]
0 2'38 Grand David Disco / pop song. Driving, catchy & fiery. Acoustic guitar, bass, ... disco lively open air catchy ... Abm 110
  • -
  • 0:00/0:00
BPM
10
300
O
KEYS
`, {boxWidth: 'calc(300px + 10%)',theme: 'cez-invitation-inscription'} ); setTimeout(function(){ $('.jconfirm-cez-invitation-inscription.jconfirme-box').attr('animation', ''); }, 1000); } /** Fin popup qui s'ouvre au out de 30s pour tout nouveau venu */ getAllIdMots = function(seriali){ if($('#type_enregistrer_resultats:checked').val()=="selected"){ var checkedVals = $('.selectidmot:checkbox:checked').map(function() { return this.value; }).get(); return checkedVals.join(","); }else{ // return tabTitlesPage.join(","); return "REQ::" + seriali; } } ///// TOAST NOTIFS var toasts = []; var sameToastsCpt = 1; const toastifyDefaultOptions = { duration: 6000, stopOnFocus: true, // Prevents dismissing of toast on hover type: 'cez', // bootstrap classes alert-{type} - cezame blue by default // close: true, // style: { background: "#1daee0" }, /// Replaced by bs classes alert-{type} onClick: function(){ toasts[this.tid].hideToast(); }, } function addNotifCustom(text, addOptions={}) { var options = {...toastifyDefaultOptions, ...addOptions}; /// Merges the objects with the last objects overriding first ones properties options.text = text; if ('className' in options) options.className += ' alert-'+options.type; else options.className = 'alert-'+options.type; var tmpToast = Toastify(options).showToast(); var tit = tmpToast.options.tid; toasts[tit] = tmpToast; return toasts[tit]; } /// duration in ms function addNotif(text, type='', seconds=0, addOptions={}) { if (type!='') addOptions.type = type; if (seconds!=0) addOptions.duration = seconds * 1000; /// Avoid cumulative notifs if (toasts.length > 0) { var lastToast = toasts[toasts.length - 1]; if (lastToast.options.text === text && $(lastToast.toastElement).hasClass('on')) { ///// Si le dernier toast est le même que celui à afficher on ajoute un badge avec le nombre de notifs similaires : /// Affichage du badge sameToastsCpt++; lastToast.toastElement.innerHTML = ''+sameToastsCpt+''+text; /// Reset le timeout de la notif d'origine window.clearTimeout(lastToast.toastElement.timeOutValue); lastToast.toastElement.timeOutValue = window.setTimeout(()=>{lastToast.removeElement(lastToast.toastElement);}, lastToast.options.duration); return lastToast; } else { sameToastsCpt = 1; } } return addNotifCustom(text, addOptions); } ///// END TOAST NOTIFS //milleryIt milleryIt = function(id_millery){ jQuery('.millery-container').hide(300); /**on vide tous les millery**/ //////jQuery.('.millery-container').remove(); jQuery('.btninsp').removeClass('selected'); jQuery('#btninsp-' + id_millery).addClass('selected'); var zecont = jQuery("#millery-"+id_millery).find(".millery-container"); if(zecont.length>0){ zecont.show(300); }else{ jQuery("#millery-" + id_millery).millery({ source: $("#millery-list-"+id_millery), panelType: "null", keepState: false, backButtonLabel: '', visibleColumns: 1, onnodeclick: function (instance, node, data) { //instance.setPanelData("Node " + node.text() + " clicked!"); return true; }, onafterappend: function(millery, column, def){ cptMilleryIntervalAppend=0; intervalMilleryAppend=setInterval( function(){ if(cptMilleryIntervalAppend>5000){ clearInterval(intervalMilleryAppend); return; } if(column.find('.millery-node').length>0){ recopierHandlersToMillery(column, id_millery); clearInterval(intervalMilleryAppend); }else{ cptMilleryIntervalAppend++; } }, 100); return true; // false prevents attachment }, oninit: function(millery){ cptMilleryInterval=0; intervalMillery=setInterval( function(){ if(cptMilleryInterval>5000){ clearInterval(intervalMillery); return; } if(millery.$elem.find('div.millery-node').length>0){ recopierHandlersToMillery(millery.$elem,id_millery); clearInterval(intervalMillery); }else{ cptMilleryInterval++; } }, 100); return true; } }); spinnerStart(); xajax_griser_mots(); } jQuery('#millery-container-' + id_millery).show(300); } recopierHandlersToMillery = function(M, id_millery){ var zulou = new Array(); M.find('div.millery-node').each(function(){ zet = $(this) .clone() //clone the element .children() //select all the children .remove() //remove all the children .end() //again go back to selected element .text(); zulou['millery-' + zet] = $(this); }); //var zul = M.parent().children('ul').first(); var zul = jQuery('#millery-list-' + id_millery); zul.find('li').each(function(){ var zea=$(this).children('a'); var zetxt = zea.text();//.replace(/\(/,"").replace(/\)/,""); var zeonclick=zea.attr('onClick'); var zeonmouseover=zea.attr('onmouseover'); var zeid=zea.attr('data-id'); var replacezul = zulou['millery-' + zetxt]; if(replacezul!=null) { replacezul.attr('id', zeid).attr('onClick', zeonclick); if(!replacezul.hasClass('millery-node-parent')) replacezul.append(""); } }); /////////xajax_griser_mots(); } removeThisInspirationWord = function(w){ var t = w.text(); //mot_sel_2050_134777 var att = w.attr('id').split(/_/); var id_liste_critere = att[3]; $(".text-label:contains('" + t +"')").parent().find('.text-remove').click(); $('#searchitem' + id_liste_critere).remove(); } //--- //- FANCYBOX //--- open_fancy = function(titre,url,w,h){ if(w!='' && h!=''){ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width':w, 'height':h, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true }); }else{ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'width' :'95%', 'height' :'95%', 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true }); } } open_fancy_cms =function(titre,url,w,h,oncloseid){ if(w!='' && h!=''){ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width':w, 'height':h, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#0000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true, 'scrolling': 'yes', 'onClosed' : function(){document.location.href='/admin/admin_pages.php?id_page=' + oncloseid} }); }else{ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'width' :'95%', 'height' :'95%', 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#0000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true, 'scrolling': 'yes', 'onClosed' : function(){document.location.href='/admin/admin_pages.php?id_page=' + oncloseid} }); } } open_fancy_video =function(titre,url,w,h){ if(w!='' && h!=''){ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width':w, 'height':h, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#0000', 'opacity' : '0.9', 'onClosed' : function(){document.location.reload();}, 'titleShow':false, 'overlayShow': true, 'showCloseButton': false }); }else{ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'width' :'95%', 'height' :'95%', 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#0000', 'opacity' : '0.9', 'onClosed' : function(){document.location.reload();}, 'titleShow':false, 'overlayShow': true, 'showCloseButton': false }); } } open_fancy_share = function(titre,url,w,h){ if(w!='' && h!=''){ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width':w, 'height':h, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'onClosed' : function(){document.location.reload();}, 'overlayShow': true }); }else{ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'width' :'95%', 'height' :'95%', 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : url, 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'onClosed' : function(){document.location.reload();}, 'overlayShow': true }); } } open_login_lightbox =function(){ var url = ""; if(""!=""){ var url="?url_download_login="; } jQuery('html, body').animate({scrollTop:100}, 'slow'); $.fancybox({ 'autoScale': true, 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width' : 655, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/login_lightbox.php'+url, 'overlayColor':'#00000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true }); $('#fancybox-wrap').removeClass('fancybox-wrap-very-pitah'); } open_subscribe_lightbox =function(){ event.preventDefault(); $.fancybox({ 'autoScale': true, 'margin' :5, 'padding' :1, 'scrolling' :'no', 'width' : 655, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/subscription_lightbox.php', 'overlayColor':'#00000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true }); $('#fancybox-wrap').removeClass('fancybox-wrap-very-pitah'); } open_embed_lightbox = function(url){ //var url = $(this).attr('data-embed'); //jQuery('html, body').animate({scrollTop:100}, 'slow'); $.fancybox({ scrolling :'no', 'width' : 320, 'height' : 320, 'maxHeight' : 320, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/assets/embed_lightbox.php', 'overlayColor':'#00000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true, 'beforeShow': function () { var newurl = ''; var $iframe = $('.fancybox-iframe'); $('textarea', $iframe.contents()).val(newurl); //$('textarea#embedcode').html(url); $('textarea', $iframe.contents()).select(); } }); } open_newsletter_lightbox = function(type,email){ //jQuery('html, body').animate({scrollTop:100}, 'slow'); $.fancybox({ scrolling :'no', 'width' : 400, 'height' : 510, 'fitToView' : false, 'autoSize' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/assets/newsletter_lightbox.php?type='+type+'&email='+email, 'overlayColor':'#00000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true }); $('#fancybox-wrap').removeClass('fancybox-wrap-very-pitah'); } open_enquete_lightbox = function(){ $.fancybox({ scrolling :'no', 'width' : 551, 'height' : 322, 'maxHeight' : 322, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/assets/enquete_lightbox.php', 'overlayColor':'#00000', 'wrapCSS' : 'enquete_lightbox', 'opacity' : '0.9', 'titleShow' : false, 'closeClick' : false, 'overlayShow' : true, 'beforeClose' : function() { if($('.enquete_lightbox iframe').contents().find('input#ko_enquete').is(':checked')){ setCookie('enquete','ko_enquete_2025-02-03',365); } }, 'afterShow' : function(){ }, helpers : { overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox } }); } check_session_download_autorisation = function(ref,titre,id_media){ $.ajax({ url : "/ajax/check_conn.php", success : function(data,ref,titre,id_media){ if(data=="OK"){ if(preference_wav_telechargement=='WAV' || preference_wav_telechargement=='MP3' || preference_wav_telechargement=='AIFF'){ getDownloadFromPrefs(preference_wav_telechargement,'tracks','','053887','',''); }else{ Tip('
',BGCOLOR,'#FFFFFF',FONTCOLOR,'#000000',BORDERWIDTH,1,BORDERCOLOR,'#CCCCCC',CLOSEBTN, false,STICKY,true,OPACITY,90,PADDING,7,ABOVE,true,CENTERMOUSE,true, DURATION, -1000,WIDTH,560); xajax_tip_download('053887'); } }else{ open_autorisationContact_lightbox(ref,titre,id_media); } } }); } open_autorisationContact_lightbox = function(ref,titre,id_media){ $.fancybox({ 'width' : 550, 'height' : 650, 'maxHeight' : 650, 'fitToView' : true, 'autoScale': false, 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'type': 'iframe', 'href': '/assets/autorisationContact_lightbox.php?ref='+ref+'&titre='+titre+'&id_media='+id_media, 'helpers' : { 'title': { type: 'inside'}, 'overlay' : {css : { 'background' : 'none'},locked: false} }, }); } open_tools_lightbox = function(){ $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'no', 'height' : 558, 'width' : 980, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe', 'href' : '/private/index.php', 'overlayColor':'#0000', 'opacity' : '0.9', 'showCloseButton':false, 'titleShow':false, 'overlayShow': true }); $('#fancybox-wrap').addClass('fancybox-wrap-very-pitah'); } open_tools_box = function(){ var left = $('#voletConteneurEspacePrive').position().left; // get left position var width = $('#voletConteneurEspacePrive').width(); // get width; var containerwidth=$(window).width(); var right = width + left - containerwidth; // add the two together if(right==0){ $('#voletConteneurEspacePrive').animate({ right: '-717px' }, 500); }else{ $('#voletConteneurEspacePrive').animate({ right: '0px' }, 500); } } // Safari setCookie() bug fix : cezSetCookie = function(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } textareaIze = function( t ){ var str=''; t.find('.infoboxy').each(function( ) { // This doesn't work because the .div_item children aren't populated? str = str + $(this).find('.libsearch').text().replace(/[\n\r]/g, '').replace(/ +/g, ' ') + '\n'; }); $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'transitionIn' : 'none', 'transitionOut' : 'none', 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true, 'autoSize': false, 'width':'370', 'height':'240', 'scrolling' : 'no', content : "" //retire pour permettre la selection de ligne precise et non pas tout le contenu //onClick='this.focus();this.select()' }); } textareaIzeParole = function( t ){ var str=''; str = t.find('.infoParole').html().replace(//mg,"\n"); $.fancybox({ 'margin' :5, 'padding' :1, 'scrolling' :'yes', 'transitionIn' : 'none', 'transitionOut' : 'none', 'overlayColor':'#000', 'opacity' : '0.9', 'titleShow':false, 'overlayShow': true, 'autoSize': false, 'width':'370', 'height':'240', 'scrolling' : 'no', content : "" //retire pour permettre la selection de ligne precise et non pas tout le contenu //onClick='this.focus();this.select()' }); } check_video_info = function(id_video){ /**cette fonction verifie l'etat d'une video e intervalle regulier et recharge l'ecran de liste des videos si jamais celle-ci devient termine**/ $.ajax({ url: '/ajax/get_video_info.php?id_video=' + id_video, success: function(data) { if(data=="demande" || data=="en cours") { setTimeout("check_video_info(" + id_video + ")",5000); }else if($('#prive_liste_videos_body').is(':visible')){ xajax_charger_ecran("liste_videos"); } } }); } //appel via se_connecter check_video_edit = function(){ var iframe = $('#espaceprive'); IntervalCheckVideoEdit = setInterval(function() { const url = window.location.href; $('#btn_edition_video').hide(); if($('#voletConteneurEspacePrive').hasClass('openprivate') ){ if(iframe.contents().find('#lien_prive_liste_videos').hasClass('active')){ if(iframe.contents().find('#form_video_montage').length){ if($('#btn_edition_video').not(':visible')){ $('#btn_edition_video').show(); } } } } }, 3000); } get_rememberme = function(){ /** fonction qui quand elle est appelee, verifie dans les cookies si l'authentification est presente, et si c'est le cas : -recupere le login et le password -remplit les champs login et passwords -procede e l'identification **/ var chiffer=getCookie("rememberme"); if(chiffer!=""){ var decoded_arr = Base64.decode(chiffer).split("|"); $('#sesouvenirdemoi').attr("checked",true); $("#header-userlogin-login").val(decoded_arr[0]); $("#header-userlogin-password").val(decoded_arr[1]); xajax_se_connecter(decoded_arr[0], decoded_arr[1]); }else{ $('#sesouvenirdemoi').attr("checked",false); } } changeLangSelect = function(){ var selectBox = document.getElementById("langSelect"); var selectedValue = selectBox.options[selectBox.selectedIndex].value; window.location.href = selectedValue; } set_rememberme = function( ){ /** si val == false on efface le cookie d'identification si val == true on positionne le cookie d'identification **/ var val = $('input#sesouvenirdemoi:checked').val(); if(val=="1"){ var login = $("#header-userlogin-login").val(); var password = $("#header-userlogin-password").val(); if(login!="" && password!=""){ var chiffer = Base64.encode(login + "|" + password + "|endofcookie"); setCookie("rememberme",chiffer,1000); } }else{ /**effacer immediatement le cookie rememberme**/ setCookie("rememberme","",-1); } } /**ajuster la taille des tags**/ function ajusterTailleTags(idt){ //yohanndev V4 return true; /* var nb = $(idt).length; var size = 13; switch(nb){ case 0: case 1: case 2: soze = 15; break; case 3: size = 12 break; case 4: case 5: size = 11; break; case 6: case 7: case 8: size = 10; break; case 9: case 10: size = 9; break; } */ if($(idt).length>0){ var w = parseInt($(idt).parent().css('width').replace('px','')); var w2 = parseInt($('.text-wrap').css('width').replace('px','')); if(w+5 > w2){ /**reduire la marge de chaque mot**/ $(idt).each(function(i){ $(this).addClass('text-tag-nomargin'); }); }else{ $(idt).each(function(i){ $(this).removeClass('text-tag-nomargin'); }); //$(idt).vAlign(); } } } /**s'execute quand on clique sur un mot de premier niveau**/ clickRechercheGuideeNiveau1 = function(o,idcra,id_liste_critere,nom_liste_critere){ if(!o.hasClass('mot_sel') && !o.hasClass('mot_busy')){ spinnerStart(); newAdvSearchPrune(nom_liste_critere); newAdvSearchAdd(idcra,id_liste_critere,nom_liste_critere,'search_hidden_results'); /**EV 05/07/2022 : on ajoute les mots de la barre de recherche**/ var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); xajax_check_multiple_words(r,xajax.getFormValues('search_hidden_results'),false,true); /////////////o.parent().find('.niveau2').show(); ///rentrerPoigneeRechercheGuidee();$('#poigneeRechercheGuidee').click(); o.addClass('mot_sel'); } } /**s'execute quand on clique sur un mot de second niveau**/ clickRechercheGuideeNiveau2 = function(o,idcra,id_liste_critere,nom_liste_critere){ if(!o.hasClass('mot_sel') && !o.hasClass('mot_busy')){ spinnerStart(); newAdvSearchPrune(nom_liste_critere); newAdvSearchAdd(idcra,id_liste_critere,nom_liste_critere,'search_hidden_results'); /**EV 05/07/2022 : on ajoute les mots de la barre de recherche**/ var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); // xajax_check_multiple_words(r,xajax.getFormValues('search_hidden_results'),false,true); o.parent().find('.niveau3').show(); /* rentrerPoigneeRechercheGuidee(); */ /* $('#poigneeRechercheGuidee').click();*/ o.addClass('mot_sel'); } } /** SG 21/03/2024 : pour qu'au click sur mot clef dans liste des résultats ca l'ajoute à la recherche reviendre **/ clickKeyWord = function(el) { var idcra = el.getAttribute('data-idcra'); var id_liste_critere = el.getAttribute('data-idlistecritere'); var nom_liste_critere = el.getAttribute('data-nomlistecritere'); var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); tagSearchAdd(idcra, id_liste_critere, nom_liste_critere, 'search_form'); xajax_check_and_add_keyword_from_tags_list(xajax.getFormValues('search_form'), r, id_liste_critere, nom_liste_critere); //SG 22/03/2024 : ici on remove les inputs concernant le mot qu'on vient d'ajouter sinon ca casse le fait de pouvoir retirer des mots de la recherche car au click sur le "-" doublon dans le formulaire var input_to_remove = document.getElementsByName('classif_'+idcra+'[]'); input_to_remove[0].remove(); } tagSearchAdd = function(id_critere,id_liste_critere,nom_liste_critere,nom_formulaire){ var hds=""; jQuery('#' + nom_formulaire ).append(hds); } newAdvSearchAdd = function(id_critere,id_liste_critere,nom_liste_critere,nom_formulaire){ var hds=""; jQuery('#' + nom_formulaire ).append(hds); } newAdvSearchPrune = function(nom_liste_critere){ var i=1; var zeopenButton = $('.inspirationselection button.selected'); if(zeopenButton.length>0){ var goodID = zeopenButton.attr('id').replace(/btninsp-/,''); $('#millery-container-'+goodID).find(".millery-breadcrumb:not(:last)").each(function(){ var zeword = $(this).text(); $('#search_hidden_results>input').each(function(){ var zeword2=$(this).attr('data-value'); if( zeword2!=null && zeword.replace(/\-/gi,' ') == zeword2.replace(/\-/gi,' ') ){ $(this).remove(); $(".text-tags .text-label").each(function(){ /**si le tag match avec zeword, on supprime le tag**/ if($(this).text() == zeword){ $(this).parent().remove(); } }); } }); i++; }); } } newAdvSearchClearWord = function(nom_liste_critere){ $('.millery-breadcrumbs').empty(); var zetag = jQuery('.millery-node').each( function(){ if($(this).text().trim() == nom_liste_critere.trim()){ $(this).removeClass('mot_sel').removeClass('millery-node-active'); var zid = $(this).attr('id'); /**rechercher le noeud dont data-id=zid**/ var ulequivalent = $( "a[data-id='" + zid + "']" ); if(ulequivalent.length>0){ var zpere = ulequivalent.parent().parent().parent(); if(zpere.is('li')){ var zpere = ulequivalent.parent().parent().parent().find("a"); if(zpere.length > 0){ var zperestr = zpere.html() jQuery('.millery-node').each( function(){ if($(this).text().trim() == zperestr.trim()){ $(this).removeClass('mot_sel').removeClass('millery-node-active'); } }); }else{ } }else{ } } } } ); /** /**dégriser le mot du parent**/ } advSearchAdd = function(id_critere,id_liste_critere,libelle) { var libreplace = libelle.replace(/'/,''); var str="" ; /**ajouter le mot à une liste existante si elle existe, sinon, la créer**/ if($("#advsearchitem"+id_liste_critere).size()==0) { /////////////////////$('#temp_terms').append(str); $('#header-search-query').textext()[0].tags().addTags([libreplace]); ajusterTailleTags('.text-tag'); $('#rechercheguidee').privateValign(); /**Appel de la fonction de recherche "affichage du nombre de résultats**/ var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); xajax_check_multiple_words(r, xajax.getFormValues('search_form')); } } advSearchRemove = function(id_critere,id_liste_critere,libelle) { if(id_liste_critere==0) { return true; } var libreplace = libelle.replace(/'/,''); $('#advsearchitem'+id_liste_critere).remove(); /**décocher l'image !**/ if(libelle!=""){ /**retirer le mot**/ $(".text-label:contains('" + libreplace +"')").parent().find('.text-remove').click(); $('#searchitem' + id_liste_critere).remove(); } /**Appel de la fonction de recherche "affichage du nombre de résultats**/ var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); xajax_check_multiple_words(r, xajax.getFormValues('search_form')); advcpt++; } /**clic sur une image de FILE**/ traiterClickImgFile = function(imagoz,id_critere,nom_critere,id_liste_critere,nom_liste_critere){ if(imagoz.attr('src').indexOf('off')==-1){ imagoz.attr('src','/themes/cezame/css/images/search-checkbox-off.gif'); advSearchRemove(id_critere, id_liste_critere,nom_liste_critere); }else{ ////////////$('.cocher_enfants').removeClass('cocher_enfants'); imagoz.attr('src','/themes/cezame/css/images/search-checkbox-on.gif'); advSearchAdd(id_critere,id_liste_critere,nom_liste_critere); } } /**clic sur une image de FOLDER**/ traiterClickImgFolder = function(imagoz,id_critere,nom_critere,id_liste_critere,nom_liste_critere){ if(imagoz.attr('src').indexOf('off')==-1){ imagoz.attr('src','/themes/cezame/css/images/search-checkbox-off.gif'); advSearchRemove(id_critere,id_liste_critere,0); $('#searchitem'+id_liste_critere).remove(); if($('#result > li').size()<1){ xajax_effacer_derniers_titres_session(); $('#allresults').hide(); }else{ } }else{ ////////////$('.cocher_enfants').removeClass('cocher_enfants'); imagoz.attr('src','/themes/cezame/css/images/search-checkbox-on.gif'); advSearchAdd(id_critere,id_liste_critere,nom_liste_critere,false); } } accentsTidy = function(s){ var r=s.toLowerCase(); r = r.replace(new RegExp(/\.(html|php)$/g),""); r = r.replace(new RegExp(/\s/g),""); r = r.replace(new RegExp(/[àáâãäå]/g),"a"); r = r.replace(new RegExp(/æ/g),"ae"); r = r.replace(new RegExp(/ç/g),"c"); r = r.replace(new RegExp(/[èéêë]/g),"e"); r = r.replace(new RegExp(/[ìíîï]/g),"i"); r = r.replace(new RegExp(/ñ/g),"n"); r = r.replace(new RegExp(/[òóôõö]/g),"o"); r = r.replace(new RegExp(/œ/g),"oe"); r = r.replace(new RegExp(/[ùúûü]/g),"u"); r = r.replace(new RegExp(/[ýÿ]/g),"y"); r = r.replace(new RegExp(/\W/g),""); r = r.replace(new RegExp(/[?&=]/g),"_"); return r; }; urlTidy = function(s){ var r=s.toLowerCase(); ////// r = r.replace(new RegExp(/[?&=]/g),"_"); r = r.replace(new RegExp(/[?]/g),"___"); r = r.replace(new RegExp(/[&]/g),"-_-"); r = r.replace(new RegExp(/[=]/g),"_-_"); r = r.replace("https://it.cezamemusic.com",""); return r; }; tidyUrl = function(s){ var r=s.toLowerCase(); ////// r = r.replace(new RegExp(/[?&=]/g),"_"); r = r.replace(new RegExp(/___/g),"?"); r = r.replace(new RegExp(/-_-/g),"&"); r = r.replace(new RegExp(/_-_/g),"="); r = "https://it.cezamemusic.com:443" + r; return r; }; function changeHauteur(H) { //document.getElementById('iframaz').style.height = H + "px"; if(H == '130'){ $('.scrollableZone').css('height','133px'); }else{ $('.scrollableZone').css('height','260px'); } $('#iframaz').css('height', H+"px"); } function open_window_txt(txt,titre){ var win = new Window({className: "dialog", width:640, height:480, zIndex: 100, resizable: true, title: titre, showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true}) win.getContent().innerHTML= "
" + txt + "
" win.setStatusBar(" "); win.showCenter(); } function open_window_downloader(url,titre,w,h,center){ var features='resizable=0,toolbar=0,menubar=0,scrollbars=1'; if(center==""){ var wint = 0; var winl = 0; }else{ if(screen.width){ var winl = (screen.width-w)/2; var wint = (screen.height-h)/2; }else{ winl = 0;wint =0; } if (winl < 0) winl = 0; if (wint < 0) wint = 0; } var settings = 'height=' + h + ','; settings += 'width=' + w + ','; settings += 'top=' + wint + ','; settings += 'left=' + winl + ','; settings += features; win = window.open(url,titre,settings); try { //win.focus(); win.blur(); win.focus() }catch (e) { var obj = $.dialog({ title: '', content: 'Un bloqueur de popups est activé sur votre navigateur ! Veuillez le désactiver (dans la barre URL). Vous pouvez également utiliser un autre navigateur 
en savoir plus', animation: 'scale', }); } //raz pour les prochains download centerpopup="1"; return win; } function open_window_url(url,titre,w,h){ var features='toolbar=0,resizable=1,status=0,scrollbars=yes'; if(screen.width){ var winl = (screen.width-w)/2; var wint = (screen.height-h)/2; }else{winl = 0;wint =0;} if (winl < 0) winl = 0; if (wint < 0) wint = 0; var settings = 'height=' + h + ','; settings += 'width=' + w + ','; settings += 'top=' + wint + ','; settings += 'left=' + winl + ','; settings += features; win = window.open(url,'popupplayer',settings); win.window.focus(); return win; } function open_window_url_scroll(url,titre,w,h){ var features='location=1,toolbar=0,resizable=0,status=0,scrollbars=yes'; if(screen.width){ var winl = (screen.width-w)/2; var wint = (screen.height-h)/2; }else{winl = 0;wint =0;} if (winl < 0) winl = 0; if (wint < 0) wint = 0; var settings = 'height=' + h + ','; settings += 'width=' + w + ','; settings += 'top=' + wint + ','; settings += 'left=' + winl + ','; settings += features; var randomnumber=Math.floor(Math.random()*1001); var titre2="win"+randomnumber; win = window.open(url,titre2,settings); //win.window.focus(); //return win; } function open_window_url_dhtml(url,titre,w,h){ var win = new Window(Application.getNewId(), {className: "dialog", title: titre, width:w, height:h, resizable: true, url: url, showEffectOptions: {duration:1}, close:function(win) {alert("validate cancel panel"); return true;}}); win.showCenter(); return win; } function dialog_iframe(url,titre,w=800,h=600,dClass=''){ // Initialisation dans footer_v3 var dgIframe = jQuery('#dialog-iframe'); var dgCtnr = dgIframe.parent(); if(dClass != '' && dgCtnr.hasClass(dClass)){ dgIframe.dialog('close'); dgIframe.dialog({ title:titre, resize: 'auto', open: function(){this.setAttribute('src',url);} }); } else { dgIframe.dialog({ title:titre, width:w, height:h, modal:true, resize: 'auto', dialogClass:dClass, open: function(){this.setAttribute('src',url);this.width='100%';} }); } /** * EV :: 12/03/2020 :: dans jquery-ui : modif du code * this.element.show().css({width:"auto" * remplacé par * this.element.show().css({width:b.width **/ dgCtnr.css({'z-index' : 1000000}); dgIframe.dialog('open'); } function ajax_control(url, width,height){ Dialog.alert({url: url, options: {method: 'get'}}, {windowParameters: {className: "cesame", width:width,height:height}, okLabel: "Chiudi"}); return win; } var txt = "
ID

"; function mycallbackform(v,m,f){ $.prompt(v +' ' + f.alertName); } function modal_login(url,niveau){ /**$.prompt(txt,{ callback: mycallbackform, submit: function(){xajax_se_connecter_modal(document.getElementById("login_modal").value,document.getElementById("password_modal").value,niveau,url);}, buttons: { Connexion: 'Se connecter'} });**/ } function modal_login_incorrect(){ $('login_error_msg').innerHTML='Login or password incorrect'; $('login_error_msg').show(); Windows.focusedWindow.updateHeight(); new Effect.Shake(Windows.focusedWindow.getId()); return false; } var txtgetsearchtname = " "; function mycallbackform2(v,m,f){ //$.prompt(v +' ' + f.alertName); } function modal_get_search_name(){ if(document.getElementById("search_modal").value==''){ //rien }else{ xajax_memoriser_recherche(xajax.getFormValues('search_form'),document.getElementById("search_modal").value); } /* $.prompt(txtgetsearchtname,{ callback: function(){ }, submit: function(){if(document.getElementById("search_modal").value==''){}else{xajax_memoriser_recherche(xajax.getFormValues('search_form'), document.getElementById("search_modal").value);}}, buttons: { Memoriser: 'Choisir un nom de recherche'} }); */ } var svgResult=''; (function($){ jQuery.fn.idle = function(time) { var o = $(this); o.queue(function() { setTimeout(function() { o.dequeue(); }, time); }); }; })(jQuery); var lastpostip=""; function centerChildren(itemli){ if(itemli.length==0) return; //var offsetmoins = parseInt(itemli.parent().parent().css('height').replace(/px$/, "") / 2); var colonneParentH = parseInt(itemli.parent().parent().css('height')); //@Yohann : regarder par rapoport e la hauteur de la fenetre, et faire quelque chose. var ecranH = Math.floor($( document ).height() / 2); var colonneEnfantH = parseInt(itemli.css('height')); var htop = parseInt(ecranH-colonneEnfantH); if(colonneEnfantH > colonneParentH ){ var hauteurCalc = 0 - parseInt(itemli.css('height').replace(/px$/, "") / 2) + 80 ; }else{ var hauteurCalc = 0 - parseInt(itemli.css('height').replace(/px$/, "") / 2) ; } itemli.css('top',hauteurCalc + 'px'); } function isRecogSearchCartouche() { return (document.getElementById('recogdiv') != null); } function spinnerStart() { hide_bpm_key(); cezProgress.start(); } // When ajaxStop is fired, rmeove 'loading' from body class function spinnerStop() { if (!isRecogSearchCartouche()) { //show_bpm_key_zone(); } cezProgress.stop(); } function spinnerStartRG() { $.blockUI({ css: { top:'35%', backgroundColor: '', color: '#fff', border: 'none', }, overlayCSS: { backgroundColor: '#000', opacity: 0.00 }, message: "" }); } // When ajaxStop is fired, rmeove 'loading' from body class function spinnerStopRG() { $.unblockUI(); } //////// /////// PROGRESS BAR OBJECT - GA 03/2022 ////// ///// Loading bar growing randomly //// Check the options to adapt parameters /// Then call cezProgress.start() / cezProgress.stop() // const CP_STOPPED = 0; const CP_STARTED = 1; const CP_STOPPING = 2; var cezProgress = { started: false, status: CP_STOPPED, cancellable: false, animStep: 0, animInterval: null, startAnimTimeout: null, div_overlay: null, div_progressbar: null, btn_cancel: null, searchbtn_elem: null, options: { baseProgressTime: 2, /// (~secondes) temps approximatif de progression de la barre pour aller de 0 à progressStall baseGrowRandMin: 8, baseGrowRandMax: 56, growRandMin: 4, /// = (baseGrowRandMin / baseProgressTime) /// déterminé lors du start() à partir de baseProgressTime growRandMax: 28, /// = (baseGrowRandMax / baseProgressTime) /// déterminé lors du start() à partir de baseProgressTime growIntervalMs: 230, timeJQSlideAnim: 110, progressStall : 0, /// Plafond de progression en attendant le cezProgress.stop() }, getProgress: function() { if (cezProgress.started()) return cezProgress.div_progressbar.style.width.slice(0, -1); else return 0; }, setProgress: function(percent){ if (cezProgress.div_progressbar != null) cezProgress.div_progressbar.style.width = percent+'%'; else return false; }, create: function(cancellable=false) { cezProgress.div_overlay = document.createElement('div'); cezProgress.div_overlay.setAttribute('id', 'cez-loading-overlay'); cezProgress.div_overlay.innerHTML = '
'; document.body.appendChild(cezProgress.div_overlay); cezProgress.div_progressbar = document.getElementById('cez-progress-bar'); cezProgress.btn_cancel = document.getElementById('btn-cancel-progress'); }, //// STATUS started: function() { return cezProgress.status === CP_STARTED }, stopped: function() { return cezProgress.status === CP_STOPPED }, stopping: function() { return cezProgress.status === CP_STOPPING }, //// START PROGRESS BAR //// progress_time : 1 par défaut - temps de progression de la barre de 0 à progressStall start: function(progress_time=false, cancellable=false) { if (cezProgress.started()) return false; /// Init Growing Min & Max random values from baseProgressTime value if (progress_time == false) progress_time = cezProgress.options.baseProgressTime; cezProgress.options.growRandMin = cezProgress.options.baseGrowRandMin / progress_time; cezProgress.options.growRandMax = cezProgress.options.baseGrowRandMax / progress_time; cezProgress.status = CP_STARTED; cezProgress.options.progressStall = getRandomIntProgress(75,85); cezProgress.div_overlay = document.getElementById('cez-loading-overlay'); if (cezProgress.div_overlay == null || cezProgress.div_overlay == false) cezProgress.create(); else cezProgress.div_progressbar = document.getElementById('cez-progress-bar'); /// If cancellable : on affiche le bouton [ANNULER] à droite dans la barre de recherche cezProgress.cancellable = cancellable; if (cancellable) { // disableScrollY(); cezProgress.bindScrollRepositionBtnCancel(); // $(document.body).addClass('no-scroll'); $(cezProgress.div_overlay).addClass('progress-cancellable'); cezProgress.searchbtn_elem = document.getElementById('searchbtn'); cezProgress.setBtnCancelPos(); $(cezProgress.btn_cancel).fadeIn(cezProgress.options.growIntervalMs); /////16/04/2024 Eric / on ne le retire plus. : document.getElementById('btn_external_recommendation').style.display = 'none'; $('#header-search-query').addClass('header-search-disabled'); } /// Si la barre de progression n'est pas encore remise à 0 : délai var animStartDelay = 0; if (cezProgress.getProgress() > 0) { animStartDelay = cezProgress.options.growIntervalMs; cezProgress.setProgress(0); } cezProgress.startAnimTimeout = setTimeout(function(){ //// Init $(cezProgress.div_overlay).show(); $(cezProgress.div_overlay).removeClass('cez-progress-overlay-small'); cezProgress.animStep = 0; /// Progress animation cezProgress.animate(); }, animStartDelay); }, animate: function() { clearTimeout(cezProgress.startAnimTimeout); cezProgress.startAnimTimeout = null; ///// avancée random toutes les 0.3s (+ transition duration) jusqu'au plafond progressStall if (cezProgress.animInterval != null) return; cezProgress.animInterval = setInterval(function(){ cezProgress.growRand(); }, cezProgress.options.growIntervalMs); }, growRand: function() { /// Random grow var progress = 0.1 * Math.round(10 * cezProgress.getProgress()); if (progress >= cezProgress.options.progressStall) { cezProgress.stop(false); return; } var addProgress = cezProgress.options.growRandMin + Math.floor(Math.random() * cezProgress.options.growRandMax); if (cezProgress.animStep > 2 && progress > (cezProgress.animStep * 0.7 * cezProgress.options.growRandMax)) /// Si la progression est trop rapide addProgress = addProgress * 0.5; if (progress > (0.65 * cezProgress.options.progressStall)) { // Ralentissement 1 addProgress = addProgress * 0.6; if (Math.random() > 0.7) addProgress = 0; else if (progress > (0.8 * cezProgress.options.progressStall)) { // Ralentissement 2 if (Math.random() > 0.7) addProgress = 0; else addProgress = addProgress * 0.5; } } var newProgress = 0.1 * Math.round(10 * (progress + addProgress)); if (newProgress >= cezProgress.options.progressStall) newProgress = cezProgress.options.progressStall + 1; cezProgress.setProgress(newProgress); }, //// STOP PROGRESS BAR //// si finish===true alors on emmène la progressbar rapidement à 100% stop: function(finish=true, cancel=false) { if (cezProgress.stopped()) { cezProgress.setProgress(0); $(cezProgress.div_overlay).hide(); return false; } if (cezProgress.animInterval != null) { clearInterval(cezProgress.animInterval); cezProgress.animInterval = null; } if (finish===true) { if (cezProgress.startAnimTimeout != null) { clearTimeout(cezProgress.startAnimTimeout); cezProgress.startAnimTimeout = null; } cezProgress.setProgress(100); cezProgress.status = CP_STOPPING; $(cezProgress.div_overlay).addClass('cez-progress-overlay-small'); if (cezProgress.cancellable) { // enableScrollY(); cezProgress.unbindScrollRepositionBtnCancel(); document.getElementById('btn_external_recommendation').style.display = 'flex'; $('#header-search-query').removeClass('header-search-disabled'); // $(document.body).removeClass('no-scroll'); $(cezProgress.div_overlay).removeClass('progress-cancellable'); $(cezProgress.btn_cancel).fadeOut(cezProgress.options.timeJQSlideAnim); if (cancel) { $(cezProgress.div_overlay).fadeOut(cezProgress.options.timeJQSlideAnim, cezProgress.resetIfNotStarted); document.getElementById('header-search-query').value = ''; return; } } setTimeout(function(){ if (!cezProgress.started()) { $(cezProgress.div_overlay).slideUp(cezProgress.options.timeJQSlideAnim, cezProgress.resetIfNotStarted); // setTimeout(function(){ /// Le temps que la barre de chargement remonte // }, cezProgress.options.timeJQSlideAnim); } }, cezProgress.options.growIntervalMs); } }, /// Fonctions utilisées dans les autres fonctions seulement - après un timeout ou une anim jQuery resetIfNotStarted: function(){ if (!cezProgress.started()) { cezProgress.status = CP_STOPPED; cezProgress.setProgress(0); } }, setBtnCancelPos: function(){ var sbpos = cezProgress.searchbtn_elem.getBoundingClientRect(); cezProgress.btn_cancel.style = 'top:'+sbpos.top+'px;right:'+(sbpos.right + 30)+'px;'; /// /!\ +30px en dur car getBoundingClientRect() détecte la position 'right' à la bordure de l'élément suivant... }, bindScrollRepositionBtnCancel: function() { window.addEventListener('scroll', cezProgress.setBtnCancelPos); }, unbindScrollRepositionBtnCancel: function() { window.removeEventListener('scroll', cezProgress.setBtnCancelPos); }, }; function getRandomIntProgress(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min)) + min; } /////// /////// JQUERY AJAX REQUEST HANDLER /////// /** GA 12/2021 * SERT A GERER DES REQUETES AJAX EN JQUERY : METHODES CANCEL, ADDCALLBACKS, et d'autres à l'avenir * USE OF jq_xhr : * Set the jq_xhr instance with the jQuery ajax request * Add callbacks on cancel if needed * Cancel or Reset **/ var jq_xhr = { instance: null, /// jq_xhr.instance = $.ajax(.....) cancel: function(){ /// pas touche if (this.instance != null) { this.instance.abort(); this.onCancelCallback(); } this.reset(); }, onCancelCallback: function(){}, /// pas touche addCancelCallback: function(addFunc){ /// jq_xhr.addCancelCallback( function(){alert('hello world')} ) this.onCancelCallback = function(){ this.onCancelCallback(); addFunc(); } }, reset: function(){ /// pas touche - reset automatiquement au jq_xhr.cancel() this.instance = null; this.onCancelCallback = function(){}; } } /////// SPINNER AJAX CANCELLABLE function spinnerStartCancellable() { cezProgress.start(45, true); } // When ajaxStop is fired, rmeove 'loading' from body class function spinnerStopCancellable() { jq_xhr.reset(); // $.unblockUI(); cezProgress.stop(true, true); } /// Triggered by click to cancel ajax and stop spinner function cancelSpinnerXHR() { jq_xhr.cancel(); spinnerStopCancellable(); } //// DISABLE SCROLL JS var fixScrollTop = 0; function disableScrollY() { fixScrollTop = window.pageYOffset || document.documentElement.scrollTop; window.addEventListener('scroll', stopScrollY); } function stopScrollY() { window.scrollTo(0, fixScrollTop); } function enableScrollY() { window.removeEventListener('scroll', stopScrollY); } var lasthtmldrag=""; /**derniere position connue du draggable**/ lastdragcontexte=''; lastdragid=''; function setLastPosDrag(jq,contexte,id){ lastdragcontexte=contexte; lastdragid=id; jq.addClass('dropilluminated'); } function byeLastposDrag(jq){ jq.removeClass('dropilluminated'); } function addDragDropMediaToFavorites(id_media){ xajax_add_basket(id_media,1) } function addDragDropMediaToProject(id_media,id_projet){ xajax_addMediaToProject(id_media,id_projet,'',1); } function downloadMedia(id_media){} function downloadMediaFormat(id_media){} getWidth = function() { if (self.innerWidth) { return self.innerWidth; } else if (document.documentElement && document.documentElement.clientHeight){ return document.documentElement.clientWidth; } else if (document.body) { return document.body.clientWidth; } return 0; } getWidthPos = function(){ return getWidth() - 720; } dropounet = function(ecran, param1){ if( param1=="" && ecran == "liste_projets"){ $("iframe#espaceprive").contents().find('#prive_' + ecran + '_content tbody tr').droppable({ drop: function(event, ui) { var draggableId = ui.draggable.attr("id_media"); var droppableId = $(this).data("id_projet"); xajax_tip_situation(draggableId,'liste_projets',droppableId); }, over: function(event, ui) { var idhover = $(this).data('id_projet'); $('#espaceprive').contents().find('.loginboxtable tbody tr').removeClass('highlighter_focus_in'); $('#espaceprive').contents().find('tr[data-id_projet="'+idhover+'"]').addClass('highlighter_focus_in'); } }); }else if(param1!="" && ecran == "liste_projets"){ $('#overlayspace').droppable({ over: function(event, ui) {}, drop: function(event, ui) { var draggableId = ui.draggable.attr("id_media"); xajax_tip_situation(draggableId,'liste_projets',param1); } }); }else if(ecran == "detail_panier"){ $('#overlayspace').droppable({ over: function(event, ui) {}, drop: function(event, ui) { var draggableId = ui.draggable.attr("id_media"); xajax_tip_situation(draggableId,ecran,param1); } }); } } dragounet =function(){ $( ".divTrack" ).draggable({ zIndex: 1000001, cursor:"grabbing", cursorAt: {left: -10, top: -10}, iframeFix: true, scroll : true, revert: true, revertDuration: 0, containment: "document", create: function(event,ui){ lastdragcontexte=''; lastdragid=''; }, start:function(event,ui){}, over:function(event,ui){}, drag:function(event,ui){ var last_man = $('#espaceprive').contents().find('#layer_prive_handle a.active'); var id_media = $(this).attr('id_media'); if(last_man.length>0){ var last_fonction = last_man.attr('id'); var last_fonction_param_1 = last_man.attr('data-param1'); if(last_fonction == "lien_prive_liste_projets" && last_fonction_param_1 == ""){ }else if(last_fonction=="lien_prive_liste_projets" || last_fonction=="lien_prive_detail_panier") { $('#overlayspace').show().css({'cursor':'grabbing'}); } } }, helper:function(event){ return "
" + $(this,"td:eq( 3 )").find('strong').text() + "
"; }, stop:function(event,ui){ $('#overlayspace').hide(); } }); } /**sortir et rentrer la recherche guidee**/ rentrerPoigneeRechercheGuidee = function(){ if(window.innerWidth > 1210){ var getwidthdynamique = $("#rechercheGuideeContainer nav").width(); } else { var getwidthdynamique = ($("#rechercheGuideeContainer nav").width() + 22); } getwidthdynamique = (Math.round(getwidthdynamique ) ); $('#rechercheGuideeContainer').animate({ left: '-'+getwidthdynamique+'px' }, 500); $('#vt_menu .navigation .niveau1').hide(); cezSetCookie("rechercheguidee","valid",1000); } sortirPoigneeRechercheGuidee = function(){ $('#rechercheGuideeContainer').animate({ left: '0px' }, 500); $("#nav-wrap").show(); $('#vt_menu .navigation .niveau1').show(); } openHddMaintenance = function(){ open_fancy("Cezame | Chargement...","/private/hddmaintenance/index.php", "800px", "800px"); } privateOpenHddMaintenance = function(){ parent.$('#poigneeVolet').click(); parent.open_fancy("Cezame | Chargement...","/private/hddmaintenance/index.php", "800px", "800px"); } goInfinite = function(loader) { jQuery.ias('destroy'); var iastl = jQuery.ias({ container: '#infinitetrackslist', item: '.listeResultat', pagination: '#pagination_tracks', next: '.next' }); if(loader != ""){ iastl.on('loaded', function(){ spinnerStop() setTimeout(function() { dragounet(); $('.btn-add-keywords').on("click", function(e){ e.preventDefault(); clickKeyWord(this); }); },250); }); iastl.on('load', function(){ spinnerStart(); }); } } /**prend une URL, un lien href et un rel unique, et puis ajaxify le tout**/ goLaunchAjaxify = function(url,tagtoclick,relinfo){ url = url.slice(0,2048); ajaxify.pronto(0, url); } goLaunchAjaxifyNA = function(url,tagtoclick,relinfo){ url = url.slice(0,2048); ajaxify.pronto(0, url); } goToSearch = function(){ } // scroll handler var scrollToAnchor = function( id ) { // grab the element to scroll to based on the name var elem = $("li[id_media='"+ id +"']"); // if that didn't work, look for an element with our ID if ( typeof( elem.offset() ) === "undefined" ) { elem = $("#"+id); } // if the destination element exists if ( typeof( elem.offset() ) !== "undefined" ) { // do the scroll if(elem.offset().top>500){ $('html, body').animate({ scrollTop: (elem.offset().top - 50) }, 1500 ); } } }; // scroll handler var scrollToFirstAnchor = function( ) { // grab the element to scroll to based on the name var elem = $("li#track_0"); // if that didn't work, look for an element with our ID if ( typeof( elem.offset() ) === "undefined" ) { elem = $("#"+id); } // if the destination element exists if ( typeof( elem.offset() ) !== "undefined" ) { // do the scroll $('html, body').animate({ scrollTop: (elem.offset().top - 50) }, 500 ); } }; TipNotConnected = function(){ Tip("",BGCOLOR,'#FFFFFF',FONTCOLOR,'#000000',BORDERWIDTH,1,BORDERCOLOR,'#CCCCCC',CLOSEBTN, true,CLOSEBTNCOLORS, ['#FFFFFF', '#000000', '#B6BBC1', '#9A9FA5'], CLOSEBTNTEXT, 'Chiudi X',STICKY,true,OPACITY,90,PADDING,7,ABOVE,true,CENTERMOUSE,true, DURATION, -1000,OFFSETY,80,WIDTH,250); xajax_tip_not_connected( ); } // SG 14/11/2023 : message de présentation des fonctionnalités IA réservées aux users connectés TipNotConnectedPubAi = function (restraint) { var obj = $.dialog({ title: '', content: restraint ? `
Login or register to enjoy the latest "AI search" features:
More info ...
` : `
Login or register to enjoy the latest "AI search" features:
More info ...
  
`, animation: 'scale', onClose: function (e, ui) { if ( !restraint ) { var nopub = document.getElementById('remember-no-pub').checked; if ( nopub ) { var expiration = new Date(); expiration.setFullYear(expiration.getFullYear() + 1); document.cookie = "no_pub_ai="+nopub+"; expires=" + expiration.toUTCString() + ";"; } } } }); } /**fonction pour clamper tous les divs qui ont la classe clampable**/ goClamp = function(){ $(".clampable").clamp({ truncationChar:'', truncationLabel:'[...]', alwaysDisplay:false }); } /** * SG 22/11/2023 : * DEBUT BLOC TRAITEMENT FILTRE BPM/KEY **/ onChangeSelectKey = function(el){ var only_word_search = jQuery('#search_form').serialize().replace('search_external_recommendation_youtube=&search_external_recommendation_brief=', ''); const url_params = new URLSearchParams(window.location.search); const id_media_str = url_params.get('id_media_str'); jQuery.ajax({ url : '/ajax/ajax_search_filters.php?key='+jQuery(el).val() }).done(function(){ // if(jQuery('#search_form').serialize()!=''){ var tmp_url = ""; if ( id_media_str !== null ) { tmp_url = '/liste_resultats.php?id_media_str='+id_media_str+'&randkeybpm='+Math.random().toString(36).substring(7); }else if(only_word_search!=''){ tmp_url = '/liste_resultats.php?'+jQuery('#search_form').serialize()+'&randkeybpm='+Math.random().toString(36).substring(7); } goLaunchAjaxify(tmp_url,'#searchlink','search_' + Math.random().toString(36).substring(7)); }); } resetSelectKey = function(){ var only_word_search = jQuery('#search_form').serialize().replace('search_external_recommendation_youtube=&search_external_recommendation_brief=', ''); const url_params = new URLSearchParams(window.location.search); const id_media_str = url_params.get('id_media_str'); jQuery.ajax({ url : '/ajax/ajax_search_filters.php?reset=1' }).done(function(){ // if(jQuery('#search_form').serialize()!=''){ var tmp_url = ""; if ( id_media_str!==null ) { tmp_url = '/liste_resultats.php?id_media_str='+id_media_str+'&randkeybpm='+Math.random().toString(36).substring(7); }else if(only_word_search!=''){ tmp_url = '/liste_resultats.php?'+jQuery('#search_form').serialize()+'&randkeybpm='+Math.random().toString(36).substring(7); } goLaunchAjaxify(tmp_url,'#searchlink','search_' + Math.random().toString(36).substring(7)); }); jQuery('.slider-min').html('10'); jQuery('.slider-max').html('300'); jQuery('#slider').slider('destroy'); load_bpm_key_slider(); jQuery('#FilterKey').val(jQuery('#FilterKey option:first').val()); jQuery('#customFilterBpm').val(''); } onChangeInputBPM = function (el) { var only_word_search = jQuery('#search_form').serialize().replace('search_external_recommendation_youtube=&search_external_recommendation_brief=', ''); const url_params = new URLSearchParams(window.location.search); const id_media_str = url_params.get('id_media_str'); jQuery.ajax({ url : '/ajax/ajax_search_filters.php?bpm='+jQuery(el).val() }).done(function(){ var tmp_url = ""; if ( id_media_str !== null ) { tmp_url = '/liste_resultats.php?id_media_str='+id_media_str+'&randkeybpm='+Math.random().toString(36).substring(7); }else if(only_word_search!=''){ tmp_url = '/liste_resultats.php?'+jQuery('#search_form').serialize()+'&randkeybpm='+Math.random().toString(36).substring(7); } goLaunchAjaxify(tmp_url,'#searchlink','search_' + Math.random().toString(36).substring(7)); }); jQuery('.slider-min').html('10'); jQuery('.slider-max').html('300'); jQuery('#slider').slider('destroy'); load_bpm_key_slider(); } resetInputBPM = function () { var only_word_search = jQuery('#search_form').serialize().replace('search_external_recommendation_youtube=&search_external_recommendation_brief=', ''); const url_params = new URLSearchParams(window.location.search); const id_media_str = url_params.get('id_media_str'); jQuery.ajax({ url : '/ajax/ajax_search_filters.php?reset=1' }).done(function(){ var tmp_url = ""; if ( id_media_str !== null ) { tmp_url = '/liste_resultats.php?id_media_str='+id_media_str+'&randkeybpm='+Math.random().toString(36).substring(7); }else if(only_word_search!=''){ tmp_url = '/liste_resultats.php?'+jQuery('#search_form').serialize()+'&randkeybpm='+Math.random().toString(36).substring(7); } goLaunchAjaxify(tmp_url,'#searchlink','search_' + Math.random().toString(36).substring(7)); }); jQuery('.slider-min').html('10'); jQuery('.slider-max').html('300'); jQuery('#slider').slider('destroy'); load_bpm_key_slider(); jQuery('#FilterKey').val(jQuery('#FilterKey option:first').val()); jQuery('#customFilterBpm').val(''); } /** * FIN BLOC TRAITEMENT FILTRE BPM/KEY **/ --> xajax_get_track_infos"); }else{ getTitle(i); } } } function loadPlayer( ) { if(Pl_debug) { console.log("loadPlayer:"+ used++); } wPlayerLaunchPlayer( 0, false); } function PlayPauseUnTitreButton(liste_titres,id_liste_critere,i){ idm=0; tab_liste_titres=liste_titres.split(/,/); for(var j=0;j0){ if( (actif.attr('id')=="Pl_play") && actif.attr('data-wait-until')=="true"){ $("#Pl_play").trigger('click'); } if(actif.attr('id')=="Pl_pause"){ $("#Pl_pause").trigger('click'); $("#Pl_pause").removeClass('active'); $('#Pl_play').attr('data-wait-until','true'); } return false; } } hasRegionStartingWith = function(prefix= "") { const regionsList = myPlaylist.regions.list; if(prefix!= ""){ for (const key in regionsList) { if (regionsList.hasOwnProperty(key) && key.startsWith(prefix)) { return key; // Retourne la clé trouvée } } }else{ if (regionsList && typeof regionsList === 'object') { return Object.keys(regionsList); } } return null; } getUrlAlbumFromID = function(Vid_album){ } function millisToMinutesAndSeconds(millis) { var minutes = Math.floor(millis / 60000); var seconds = Math.floor( ((millis % 60000) / 1000)); return (seconds == 60 ? (minutes+1) + ":00" : minutes + ":" + (seconds < 10 ? "0" : "") + seconds); } wPlayerSendEvent = function(type,val){ if (myPlaylist?.playlist?.[val]?.id_media !== undefined) { var idm=myPlaylist.playlist[val].id_media; }else{ //console.log("fct:wPlayerSendEvent "+type +" rang:"+ val); //console.log(myPlaylist); } if(type=="SEEK"){ return void(0); } //23/05/24 a voir si on garde, regression possible $('#Pl_stop').removeClass('active'); if(type=="ITEM" || type=="REGION"){ //remove les actifs $(".boxcontroleplayer button.Tl_listening").hide(); $(".boxcontroleplayer button.Tl_play").show(); $(".boxcommand button").removeClass("active"); $(".boxcontroletracks button").removeClass("active"); $(".boxcontroleplayer button:not(.Tl_favorite)").removeClass('active'); //player $('#Pl_play').hide(); $('#Pl_pause').show().addClass("active"); $('#Pl_playcover').hide(); $('#Pl_pausecover').show(); //tl $("#boxcontrol_"+idm).find('.Tl_play').hide(); $("#boxcontrol_"+idm).find('.Tl_listening').show().addClass('active'); //Lts $(".boxcontroletracks").find('.Lts_play').hide(); $(".boxcontroletracks").find('.Lts_listening').show().addClass('active'); $('.TexteDescriptionTrackOver').removeClass('TexteDescriptionTrackOver').addClass('TexteDescriptionTrackVisited'); $(".TexteDescriptionTrack[id_media='"+ idm +"']").addClass('TexteDescriptionTrackOver'); $(".TexteDescriptionTrack[id_media='0"+ idm +"']").addClass('TexteDescriptionTrackOver'); if(from_last_click=="videoedit" || from_last_click=="videosharing"){ let typeframe; if(from_last_click == "videoedit"){ typeframe = frames['espaceprive'].document; }else{ typeframe = document; } $(".controllistprivate button.Ve_listening", typeframe).hide(); $(".controllistprivate button.Ve_play", typeframe).show(); $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate button.Ve_play", typeframe).hide(); $(".controllistprivate button.Ve_listening", typeframe).show().addClass('active'); } //private if(from_last_click=="private"){ /**YOHANN :: si la ligne n'existe pas, sauter d''un cran**/ if ($("tr[id_media='"+ idm +"']", frames['espaceprive'].document).length ==0 ){ if(parseInt(val) < parseInt(curIndex)){ //en arriere if(Number(val) == 0){ //debut de chaine on fait rien }else{ wPlayerSendEvent("ITEM",(Number(val)-1)); } }else{ //en avant if(val ==(myPlaylist.playlist.length - 1)){ //fin de chaine on fait rien }else{ wPlayerSendEvent("ITEM",(Number(val)+1)); } } return; } $(".controllistprivate button.Tl_listening").hide(); $(".controllistprivate button.Tl_play").show(); $(".controllistprivate button").removeClass('active'); $(".controllistprivate button", frames['espaceprive'].document).removeClass('active'); $("tr[id_media='"+ idm +"'] .Tl_play", frames['espaceprive'].document).hide(); $("tr[id_media='"+ idm +"'] .Tl_listening", frames['espaceprive'].document).show().addClass('active'); } if( from_last_click!="private" && ($(".divTrackAlt[id_media='" + idm + "']").is(':hidden') || $(".divTrackAlt[id_media='0" + idm + "']").is(':hidden')) ) { //est ce qu'on va en avant ou en arriere if(parseInt(val) < parseInt(curIndex)){ //en arriere if(Number(val) == 0){ clickPrevScrolledTrack(); }else{ wPlayerSendEvent("ITEM",(Number(val)-1)); } }else{ if(val ==(myPlaylist.playlist.length - 1)){ clickNextScrolledTrack(); }else{ wPlayerSendEvent("ITEM",(Number(val)+1)); } } return; } /**Revenir Ici***/ if(type != "REGION"){ setCurrentSong(val); } myPlaylist.on('ready', function() { if(from_last_click == "videoedit"){ //region.update /*region.update({ dragSelection: { slop: 5 } });*/ $( "#video-montage-loop",frames['espaceprive'].document ).on( "change", function(e) { region.update({ loop: $(this).is(':checked') }); }); } if(type !== "REGION"){ //pour type = item // permet de creer une pause dans une region //yohanndev region const regionKey = hasRegionStartingWith('video_'); if (regionKey) { const region = myPlaylist.regions.list[regionKey]; const start = region.start; const end = region.end; $("#espaceprive").contents().find('#video-montage-start').val(start); $("#espaceprive").contents().find('#video-montage-end').val(end); myPlaylist.play(start, end); } else { myPlaylist.play(); } } }); return; } if(type=="PLAY"){ //remove les actifs $(".boxcontroleplayer button.Tl_listening").hide(); $(".boxcontroleplayer button.Tl_play").show(); $(".boxcommand button").removeClass("active"); $(".boxcontroletracks button").removeClass("active"); $(".boxcontroleplayer button:not(.Tl_favorite)").removeClass('active'); //player $('#Pl_play').hide(); $('#Pl_pause').show().addClass("active"); $('#Pl_playcover').hide(); $('#Pl_pausecover').show(); //tl $("#boxcontrol_"+idm).find('.Tl_play').hide(); $("#boxcontrol_"+idm).find('.Tl_listening').show().addClass('active'); //lts cartouche $(".boxcontroletracks").find('.Lts_play').hide(); $(".boxcontroletracks").find('.Lts_listening').show().addClass('active'); $('.TexteDescriptionTrackOver').removeClass('TexteDescriptionTrackOver').addClass('TexteDescriptionTrackVisited'); $(".TexteDescriptionTrack[id_media='"+ idm +"']").addClass('TexteDescriptionTrackOver'); $(".TexteDescriptionTrack[id_media='0"+ idm +"']").addClass('TexteDescriptionTrackOver'); //Thumbs carousel if($('.item_wrap').length > 0){ $('.item_wrap ul.active').find('.Th_pausecover').show(); $('.item_wrap ul.active').find('.Th_playcover').hide(); } //private if(from_last_click=="private"){ $(".controllistprivate button.Tl_listening").hide(); $(".controllistprivate button.Tl_play").show(); $(".controllistprivate button").removeClass('active'); $(".controllistprivate button", frames['espaceprive'].document).removeClass('active'); $("tr[id_media='"+ idm +"'] .Tl_play", frames['espaceprive'].document).hide(); $("tr[id_media='"+ idm +"'] .Tl_listening", frames['espaceprive'].document).show().addClass('active'); } if(from_last_click=="videoedit" || from_last_click=="videosharing"){ let typeframe; if(from_last_click == "videoedit"){ typeframe = frames['espaceprive'].document; }else{ typeframe = document; } $(".controllistprivate button.Ve_listening", typeframe).hide(); $(".controllistprivate button.Ve_play", typeframe).show(); $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate button.Ve_play", typeframe).hide(); $(".controllistprivate button.Ve_listening", typeframe).show().addClass('active'); } //init //$('#current_id_media').val(val); } if(type=="LOAD"){ $(".boxcontroleplayer button:not(.Tl_favorite)").removeClass('active'); //player $('#Pl_play').show().addClass("active"); $('#Pl_pause').hide(); $('#Pl_playcover').show(); $('#Pl_pausecover').hide(); //tl $("#boxcontrol_"+idm).find('.Tl_play').show().addClass('active'); $("#boxcontrol_"+idm).find('.Tl_listening').hide(); //lts cartouche $(".boxcontroletracks").find('.Lts_play').show().addClass('active'); $(".boxcontroletracks").find('.Lts_listening').hide(); if(from_last_click=="videoedit" || from_last_click=="videosharing"){ let typeframe; if(from_last_click == "videoedit"){ typeframe = frames['espaceprive'].document; }else{ typeframe = document; } $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate button.Ve_listening", typeframe).hide(); $(".controllistprivate button.Ve_play", typeframe).show(); }else if(from_last_click=="private"){ $(".controllistprivate button", frames['espaceprive'].document).removeClass('active'); $("tr[id_media='"+ idm +"'] .Tl_play", frames['espaceprive'].document).show().addClass('active'); $("tr[id_media='"+ idm +"'] .Tl_listening", frames['espaceprive'].document).hide(); } setCurrentSongLOAD(val,type); } if(type=="PAUSE"){ //remove les actifs //on supprime pas ici les actifs car il permette de recuperer la currentpos $(".boxcontroleplayer button:not(.Tl_favorite)").removeClass('active'); //player $('#Pl_play').show().addClass("active"); $('#Pl_pause').hide(); $('#Pl_playcover').show(); $('#Pl_pausecover').hide(); //tl $("#boxcontrol_"+idm).find('.Tl_play').show().addClass('active'); $("#boxcontrol_"+idm).find('.Tl_listening').hide(); //lts cartouche $(".boxcontroletracks").find('.Lts_play').show().addClass('active'); $(".boxcontroletracks").find('.Lts_listening').hide(); //Thumbs carousel if($('.item_wrap').length > 0){ $('.item_wrap').find('.Th_playcover').show(); $('.item_wrap').find('.Th_pausecover').hide().removeClass('active'); } if(from_last_click=="private"){ $(".controllistprivate button").removeClass('active'); $("tr[id_media='"+ idm +"'] .Tl_listening", frames['espaceprive'].document).hide(); $("tr[id_media='"+ idm +"'] .Tl_play", frames['espaceprive'].document).show().addClass('active'); } if(from_last_click=="videoedit" || from_last_click=="videosharing"){ let typeframe; if(from_last_click == "videoedit"){ typeframe = frames['espaceprive'].document; }else{ typeframe = document; } $(".controllistprivate button", typeframe).removeClass('active'); $(".controllistprivate .Ve_listening", typeframe).hide().removeClass('active'); $(".controllistprivate .Ve_play", typeframe).show().addClass('active'); } } if(type=="STOP"){ //remove les actifs $(".boxcommand button").removeClass("active"); $(".boxcontroletracks button").removeClass("active"); $(".boxcontroleplayer button:not(.Tl_favorite)").removeClass('active'); $(".controllistprivate button").removeClass('active'); //player $('#Pl_stop').addClass("active"); $('#Pl_play').show(); $('#Pl_pause').hide(); $('#Pl_playcover').show(); $('#Pl_pausecover').hide(); //tl $(".boxcontroleplayer button.Tl_listening").hide(); $(".boxcontroleplayer button.Tl_play").show(); //lts cartouche $(".boxcontroletracks button.Lts_listening").hide(); $(".boxcontroletracks button.Lts_play").show(); $(".boxcontroletracks button.Lts_play").show(); //Thumbs carousel if($('.item_wrap').length > 0){ $('.item_wrap ul').removeClass('active'); $('.item_wrap').find('.Th_playcover').show(); $('.item_wrap').find('.Th_pausecover').hide().removeClass('active'); } //$('#current_id_media').val(val); if(from_last_click=="private"){ $("tr", frames['espaceprive'].document).removeClass('titrepriveplay'); $("tr[id_media='"+ idm +"'] .Tl_listening", frames['espaceprive'].document).hide().removeClass('active'); $("tr[id_media='"+ idm +"'] .Tl_play", frames['espaceprive'].document).show().removeClass('active'); } if(from_last_click=="videoedit" || from_last_click=="videosharing"){ let typeframe; if(from_last_click == "videoedit"){ typeframe = frames['espaceprive'].document; }else{ typeframe = document; } $(".controllistprivate button.Ve_listening", typeframe).hide(); $(".controllistprivate button.Ve_play", typeframe).show(); } pos= val; } if(type=="NEXT"){ //recupere l'ancien id joué et replace les boutons //tl $("#boxcontrol_"+idm).find('.Tl_play').show(); $("#boxcontrol_"+idm).find('.Tl_listening').hide(); $('.TexteDescriptionTrackOver').removeClass('TexteDescriptionTrackOver').addClass('TexteDescriptionTrackVisited'); $(".TexteDescriptionTrack[id_media='"+ idm +"']").addClass('TexteDescriptionTrackOver'); $(".TexteDescriptionTrack[id_media='0"+ idm +"']").addClass('TexteDescriptionTrackOver'); } if(type=="PREVIOUS"){ //recupere l'ancien id joué et replace les boutons //tl $("#boxcontrol_"+idm).find('.Tl_play').show(); $("#boxcontrol_"+idm).find('.Tl_listening').hide(); $('.TexteDescriptionTrackOver').removeClass('TexteDescriptionTrackOver').addClass('TexteDescriptionTrackVisited'); $(".TexteDescriptionTrack[id_media='"+ idm +"']").addClass('TexteDescriptionTrackOver'); $(".TexteDescriptionTrack[id_media='0"+ idm +"']").addClass('TexteDescriptionTrackOver'); } } wPlayerLaunch = function(start,loadItemOnly){ if(typeof loadItemOnly !== 'undefined' && loadItemOnly!= ""){ //console.log("wPlayerLaunch::LOAD tracks mode"); wPlayerSendEvent('LOAD',start); }else{ wPlayerSendEvent('ITEM',start); ///!\espaceprivé :: click sur la video } if(Pl_debug) { console.log("fct:wPlayerLaunch "+start); } } wPlayerGetCurrentItemNumber2 = function(){ //recupere la piste courante qui est joué selon les attributs html //var curItem = 0; //si le bouton hautparleur est bleu donc actif, la lecture est en cours var curItemPosPlaying = $('.Tl_listening.active:visible').closest("ul"); //si le bouton play est bleu, donc actif, la lecture est en pause var curItemPosPause = $('.Tl_play.active:visible').closest("ul"); //espace prive box // espace prive window if($('#espaceprive').length || $('#espaceprive', parent).length || window.location.pathname == "/privatewidget.php") { var curItemPosEP = $("tr.titreprive",frames['espaceprive'].document).hasClass('titrepriveplay'); } var curItemPosCF = $("ul.compo_musique_originale").hasClass('compo_listSelected'); if(curItemPosPlaying.length>0 && from_last_click=="public"){ curItem=curItemPosPlaying.attr('curposition'); }else if(curItemPosPause.length>0 && from_last_click=="public"){ curItem=curItemPosPause.attr('curposition'); }else{ //il existe deja un current index, si oui on le prend if(typeof curIndex != "undefined"){ var curItem = 0; }else{ curItem=0; } if(typeof pos != "undefined" && pos!=""){ curItem = pos; } } if(curItemPosEP==true && from_last_click=="private"){ curItem=$("tr.titrepriveplay",frames['espaceprive'].document).attr('curposition'); } if(curItemPosCF==true && from_last_click=="composers"){ curItem=$("ul.compo_listSelected").attr('curposition'); } if(Pl_debug) { console.log("fct:wPlayerGetCurrentItemNumber2 - curentitem:"+curItem); } return curItem; } function playRegion(resume,from,type="video"){ const regionKey = hasRegionStartingWith(type+'_'); //console.log("playRegion()::"+regionKey); if(resume){ wPlayerSendEvent('REGION',0); if(regionKey){ myPlaylist.play(); }else{ window.parent.xajax_load_player_playlist($('#id_media',frames['espaceprive'].document).val(),'','0',from,'',$('#id_video',frames['espaceprive'].document).val()); } }else{ wPlayerSendEvent('REGION',0); if(regionKey){ myPlaylist.regions.list[regionKey].play(); }else{ window.parent.xajax_load_player_playlist($('#id_media',frames['espaceprive'].document).val(),'','0',from,'',$('#id_video',frames['espaceprive'].document).val()); } } } function fctclearRegions(){ const regionKey = hasRegionStartingWith(); //ne jamais clear les (climax[0-9]) //if(regionKey.some(item => item.startsWith('climax'))){ if(regionKey){ regionKey.forEach(key => { if (!key.startsWith('climax')) { // Si la clé ne commence pas par "climax", appeler remove() sur l'élément correspondant dans regionsList if (myPlaylist.regions.list.hasOwnProperty(key)) { myPlaylist.regions.list[key].remove(); } } }); }else{ //on efface tout myPlaylist.clearRegions(); } } function createRegion(regionStart, regionEnd, readOnly,loop,maxLength,id) { custom_region_id = id; const maxDuration = 60; // Durée maximale en secondes provenant de la video ( plus tard!!) const duration = parseInt(myPlaylist.getDuration()); if(regionStart == 0 && regionEnd == 0){ const regionEnd = Math.min(regionStart + maxDuration, duration); } if(readOnly !== null && readOnly !== '' && readOnly == true){ defaultEdit = { drag: false, resize: false }; }else{ defaultEdit = { drag: true, resize: true }; } if(loop !== null && loop !== '' && loop == true){ defaultLoop = { loop: true }; }else{ defaultLoop = { loop: false }; } if (typeof maxLength !== 'undefined' && maxLength !== null) { defaultOptions = { id:id, start: regionStart, end: regionEnd, color: 'rgba(0, 123, 255, 0.3)' //maxLength: maxLength,//bug wavesurfer on drag }; } else { defaultOptions = { id:id, start: regionStart, end: regionEnd, color: 'rgba(0, 123, 255, 0.3)', }; } region = myPlaylist.addRegion({ ...defaultOptions, ...defaultEdit, ...defaultLoop }); } // Create a WaveSurfer instance wPlayerLaunchPlayer = function(position,autostartplayer){ if($("#Pl_waveform").length == 0){ if(Pl_debug) { console.log("not exist Pl_waveform : wPlayerLaunchPlayer"); } return false; } // Create a canvas gradient const ctx1 = document.createElement('canvas').getContext('2d') const gradient = ctx1.createLinearGradient(0, 0, 0, 150) gradient.addColorStop(0, 'rgb(35, 149, 255)') gradient.addColorStop(0.7, 'rgb(28, 111, 195)') gradient.addColorStop(1, 'rgb(0, 0, 0)') const ctx2 = document.createElement('canvas').getContext('2d') const gradientdefault = ctx2.createLinearGradient(0, 0, 0, 150) gradientdefault.addColorStop(0, 'rgb(193, 193, 193)') gradientdefault.addColorStop(0.7, 'rgb(124, 124, 124)') gradientdefault.addColorStop(1, 'rgb(0, 0, 0)') /*init*/ myPlaylist = WaveSurfer.create({ container: '#Pl_waveform', backend: 'MediaElement', mediaType:'audio', cursorColor:'#1daee0', reflection:false, closeAudioContext:true, plugins: [ WaveSurfer.regions.create({ dragSelection: {slop: 5} }), WaveSurfer.cursor.create({ showTime: true, hideOnBlur: true, opacity: 1, customShowTimeStyle: { 'background-color': '#1daee0', 'color': '#fff', 'padding': '2px', 'font-size': '10px', 'borderRightColor':'#1daee0' } }) ], //waveColor: '#c1c1c1', waveColor: gradientdefault, //progressColor: '#2395ff', progressColor:gradient, height: dimPeak, barWidth: 3, responsive:true, normalize: true }); if(playList.length == 0){ return false; } /**assignation de la playlist**/ myPlaylist.playlist = playList; myPlaylist.setVolume(volume); /*stop spinner*/ spinnerStop(); /*timer*/ myPlaylist.on('ready', function() { $('showtitle').css('z-index', '5001'); var totalTime = myPlaylist.getDuration(); $('#time-total').html(millisToMinutesAndSeconds(Math.round(totalTime * 1000))); spinnerStop(); /*sliderzoom.oninput = function () { var zoomLevel = Number(sliderzoom.value); myPlaylist.zoom(zoomLevel); };*/ /*myPlaylist.once('decode', () => { document.querySelector('input#zoom-range[type="range"]').oninput = (e) => { const minPxPerSec = Number(e.target.value) myPlaylist.zoom(minPxPerSec) } })*/ myPlaylist.on('region-created', function (region) { /*console.log('region-created fired!!'); console.log(myPlaylist.regions.list); console.log(region.id);*/ }); myPlaylist.on('region-updated', function(e){ var regionid=e.id; var regionsList = myPlaylist.regions.list; const iframe = $('#espaceprive'); if(defaultEdit.drag == false && defaultEdit.resize== false){ //partage const url = window.location.href; if (url.includes("lire_titres")) { const keys = Object.keys(regionsList); if (keys.length > 1 && typeof keys[1] !== 'undefined') { secondRegion = keys[1]; regionsList[secondRegion].remove() ; } }else{ fctclearRegions(); } }else{ //cad d'edition sur une fenetre ouverte espace video : detail video if($('#voletConteneurEspacePrive').hasClass('openprivate') && from_last_click === "videoedit"){ if(iframe.contents().find('#lien_prive_liste_videos').hasClass('active')){ if(iframe.contents().find('#form_video_montage').length){ let dureeRegion = (e.end - e.start); let dureeVideo = $("#espaceprive").contents().find('#videoDuration').val(); if(Number(dureeRegion) > Number(dureeVideo)){ e.end = (parseFloat(e.start) + Number(dureeVideo)); } //ne peux pas depasser la longueur d'une video let regionKeys = Object.keys(regionsList); // Récupérer toutes les régions actuelles let hasRecommandation = regionKeys.some(key => key.startsWith('video')); // Vérifier si "recommandation" existe let isCurrentClimax = regionid && regionid.startsWith('climax'); // Vérifier si la région actuelle est "climax" // Si une région "video" existe et ce n'est pas celle mise à jour, empêcher la création if (hasRecommandation && !regionid.startsWith('video')) { if (regionid && regionsList[regionid]) { regionsList[regionid].remove(); // Supprimer la région en cours si elle est invalide } return; // Ne pas continuer } // Supprimer toutes les régions sauf "climax" et la région mise à jour regionKeys.forEach(key => { if (key !== regionid && !key.startsWith('climax')) { if (regionsList[key] && typeof regionsList[key].remove === 'function') { regionsList[key].remove(); // Supprimer les autres régions } } }); } } //cas edition d'une recommandation }else if(from_last_click === "recommandationedit"){ let regionKeys = Object.keys(regionsList); // Récupérer toutes les régions actuelles let hasRecommandation = regionKeys.some(key => key.startsWith('recommandation')); // Vérifier si "recommandation" existe let isCurrentClimax = regionid && regionid.startsWith('climax'); // Vérifier si la région actuelle est "climax" // Si une région "recommandation" existe et ce n'est pas celle mise à jour, empêcher la création if (hasRecommandation && !regionid.startsWith('recommandation')) { if (regionid && regionsList[regionid]) { regionsList[regionid].remove(); // Supprimer la région en cours si elle est invalide } return; // Ne pas continuer } // Supprimer toutes les régions sauf "climax" et la région mise à jour regionKeys.forEach(key => { if (key !== regionid && !key.startsWith('climax')) { if (regionsList[key] && typeof regionsList[key].remove === 'function') { regionsList[key].remove(); // Supprimer les autres régions } } }); }else{ fctclearRegions(); } } if($('#voletConteneurEspacePrive').hasClass('openprivate') && from_last_click === "videoedit" ){ if(iframe.contents().find('#lien_prive_liste_videos').hasClass('active')){ if(iframe.contents().find('#form_video_montage').length){ $("#espaceprive").contents().find('#video-montage-start').val(e.start); $("#espaceprive").contents().find('#video-montage-end').val(e.end); $("#espaceprive").contents().find('video#video-montage').get(0).pause(); if($('#video-montage').length > 0 ){ document.getElementById('video-montage').pause(); } $("#Pl_stop").trigger('click'); } } }else if(from_last_click === "recommandationedit"){ const id_media = custom_region_id.split("_")[1]; const $tooltip = $("#tooltiprecommandation_" + id_media); $tooltip.find('.Ttr_timingdebut').val(e.start); $tooltip.find('.Ttr_timingfin').val(e.end); }else{ } }); }); idm = myPlaylist.playlist[position].id_media; myPlaylist.on('audioprocess', function() { //console.log(from_last_click); var totalTime = myPlaylist.getDuration(); $('#time-total').html(millisToMinutesAndSeconds(Math.round(totalTime * 1000))); if(myPlaylist.isPlaying()) { var currentTime = myPlaylist.getCurrentTime(); var remainingTime = totalTime - currentTime; currentMod = parseInt(parseInt(currentTime*1000) % 10000 ); if(currentMod < lastcurrentMod){ $.ajax({ url: '/ajax/ajax_stats.php', type:'POST', data:'id_media='+idm+"&stats="+millisToMinutesAndSeconds(Math.round(myPlaylist.getCurrentTime() * 1000)), }); }else{ } lastcurrentMod = currentMod; $('#time-current').html(millisToMinutesAndSeconds(Math.round(currentTime * 1000))); $('#time-remaining').html(millisToMinutesAndSeconds(Math.round(remainingTime * 1000))); } }); myPlaylist.on('destroy', function () { if(Pl_debug) { console.log('!!!!!!!!!!!!!! Wavesurfer destroy !!!!!!!!!!!!!!'); } }); if(position>0){ wPlayerSendEvent("ITEM",position) } if(autostartplayer){ wPlayerSendEvent("PLAY"); } $('#volume').on('input', function () { $(this).trigger('change'); myPlaylist.setVolume($(this).val()); }); $('#zoom').on('input', function () { $(this).trigger('change'); myPlaylist.zoom(Number(this.value)); }); $("#Pl_thumblink,#toggleplaycover").on('click', function(e) { //myPlaylist.playPause(); e.preventDefault(); }); $("#Pl_mute").on('click', function(e) { $(this).toggleClass("active"); myPlaylist.toggleMute(); e.preventDefault(); }); $("#Pl_download").on('click', function(e) { Tip('
',BGCOLOR,'#FFFFFF',FONTCOLOR,'#000000',BORDERWIDTH,1,BORDERCOLOR,'#CCCCCC',CLOSEBTN, false,STICKY,true,OPACITY,90,PADDING,7,ABOVE,true,CENTERMOUSE,true, DURATION, -1000,WIDTH,350); xajax_tip_download($('#current_id_media').val()); e.preventDefault(); }); $("#Pl_add").on('click', function(e){ Tip('
',BGCOLOR,'#FFFFFF',FONTCOLOR,'#000000',BORDERWIDTH,1,BORDERCOLOR,'#CCCCCC',CLOSEBTN, true,CLOSEBTNCOLORS, ['#FFFFFF', '#000000', '#B6BBC1', '#9A9FA5'], CLOSEBTNTEXT, 'Chiudi X',STICKY,true,OPACITY,90,PADDING,7,ABOVE,true,CENTERMOUSE,true, DURATION, -1000,OFFSETY,80,WIDTH,'calc(300px + 20%)'); xajax_tip_basket($('#current_id_media').val()); e.preventDefault(); }); $("#Pl_similarto").on('click', function(e) { var t = $('#egale_id_media_' + $('#current_id_media').val() ); var ididid = $('#current_id_media').val(); var u = $('#Pl_waveform audio').attr('src').replace(/\?.*$/,''); launch_recommendation(u,ididid); e.preventDefault(); }); $("#Pl_pref").on('click', function(e) { xajax_tip_favorites($('#current_id_media').val(),'player'); e.preventDefault(); }); $("#Pl_share").on('click', function(e) { var urlSocialShare = getShareURL('','','',$('#current_id_media').val()); socialSharePopup(urlSocialShare); }); $("#Pl_copyright").on('click', function(e) { if(Pl_debug) { console.log("copyright"+'#infoBoxListePlayerPage_'+$('#current_id_media').val()); } //$('#infoBoxListePlayerPage_'+$('#current_id_media').val()).show(); $this = $(this); $.fancybox({ autoSize: true, href: '#infoBoxListePlayerPage_'+$('#current_id_media').val(), fitToView : true, minWidth : '70%', openEffect :'fade', openSpeed :300, title: this.title, helpers : { title: { type: 'outside'}, } }); return false; e.preventDefault(); }); $("#Pl_stop").on('click', function(e) { if( $('#voletConteneurEspacePrive').is(':visible') && $('#voletConteneurEspacePrive').hasClass('openprivate') ){ if(from_last_click!="" && from_last_click == "videoedit"){ from_last_click = 'videoedit'; }else{ from_last_click = 'private'; } }else if(window.location.pathname == "/privatewidget.php" ){ from_last_click = 'private'; }else{ if(from_last_click == ""){ from_last_click = 'public'; }else{ from_last_click = from_last_click; } } var pos=wPlayerGetCurrentItemNumber2(); wPlayerSendEvent('STOP',pos); myPlaylist.stop(); e.preventDefault(); }); $("#Pl_pause,#Pl_pausecover").on('click', function(e,current) { flag = false; if( $('#voletConteneurEspacePrive').is(':visible') && $('#voletConteneurEspacePrive').hasClass('openprivate') ){ if(from_last_click!="" && from_last_click== "videoedit"){ from_last_click = 'videoedit'; }else{ from_last_click = 'private'; } }else if(window.location.pathname == "/privatewidget.php" ){ from_last_click = 'private'; }else{ if(from_last_click == ""){ from_last_click = 'public'; }else{ from_last_click = from_last_click; } } //si current est passé en parametre, ca provient d'un trigger, d'une liste de lecture (tentative abordée, mais fontionnelle) if (current !== undefined) { var pos = current; flag = true; }else{ //si on presse pause, il y forcement un bouton lecture actif, sinon on fait rien var pos=wPlayerGetCurrentItemNumber2(); flag = true; } if(flag){ wPlayerSendEvent('PAUSE',pos); myPlaylist.pause(); } e.preventDefault(); }); $("#Pl_play,#Pl_playcover").on('click', function(e) { if( $('#voletConteneurEspacePrive').is(':visible') && $('#voletConteneurEspacePrive').hasClass('openprivate') ){ if(from_last_click!= "" && from_last_click=="videoedit"){ from_last_click = 'videoedit'; }else{ //yohanndev - adevelopper erreur id_media from_last_click = 'private'; } }else if(window.location.pathname == "/privatewidget.php" ){ from_last_click = 'private'; }else{ if(from_last_click == ""){ from_last_click = 'public'; }else{ from_last_click = from_last_click; } } if(from_last_click === "recommandationedit"){ playRegion("","recommandationedit",type="recommandation"); }else{ var pos=wPlayerGetCurrentItemNumber2(); wPlayerSendEvent('PLAY',pos); myPlaylist.play(); e.preventDefault(); } }); $("#Pl_next").on('click', function(e) { var pos=curIndex; wPlayerSendEvent('NEXT',pos); if(pos ==(myPlaylist.playlist.length - 1)){ clickNextScrolledTrack(); return; }else{ wPlayerSendEvent("ITEM",(Number(pos)+1)); } e.preventDefault(); }); $("#Pl_previous").on('click', function(e) { var pos=curIndex; wPlayerSendEvent('PREVIOUS',pos); if(Number(pos) == 0){ clickPrevScrolledTrack(); return; }else{ wPlayerSendEvent("ITEM",(Number(pos)-1)); } e.preventDefault(); }); $("#Pl_minimyseme").on('click', function(e) { if( $('.Pl_wrap').hasClass('minimizeme')){ setCookie("minimizeme",'false',1000); }else{ setCookie("minimizeme",'true',1000); } $('.Pl_wrap').toggleClass( 'minimizeme',800 ); myPlaylist.drawer.containerWidth = myPlaylist.drawer.container.clientWidth; myPlaylist.drawBuffer(); check_status_drawer('fromminimize'); e.preventDefault(); }); myPlaylist.on('play', function() { //pendant que le morceau joue }); myPlaylist.on('finish', function() { wPlayerSendEvent('NEXT',curIndex); if(curIndex == (myPlaylist.playlist.length - 1)){ clickNextScrolledTrack(); if(Pl_debug) { console.log("fct:clickNextScrolledTrack fin de liste pagination"); } return; }else{ wPlayerSendEvent("ITEM",(Number(curIndex)+1)); } }); myPlaylist.on('region-click', function(region, e) { //myPlaylist.play(region.start); //region.playLoop() //e.stopPropagation(); // Play on click, loop on shift click //e.shiftKey ? region.playLoop() : region.play(); }); } window.setCurrentSongLOAD = function(index,type='') { if( typeof myPlaylist == 'undefined'){ return false; } //console.log("fct:setCurrentSongLOAD index"+index+" type"+type ); var playlist = myPlaylist.playlist; info_media = playlist[index]; $("#Pl_url").attr("href",info_media.linkalbum); $("#Pl_thumbs").attr("src",info_media.img); $("#Pl_thumbs").attr("alt",info_media.titre); $(".Pl_zone_title").attr('data-id_media',info_media.id_media); $("#Pl_title").html(info_media.titre); $("#Pl_album").html(info_media.titre_album); $("#Pl_ref").html(info_media.ref); $("#Pl_position").html(info_media.position); $.ajax({ url: '/jsonfy.php', type:'POST', data:'id_media='+info_media.id_media+"&ref="+info_media.ref, success: function(result_waveform){ data_peaks = (result_waveform); }, async: false }); myPlaylist.song = info_media.mp3; myPlaylist.backend.peaks = data_peaks.data; myPlaylist.drawBuffer(); /**climax**/ myPlaylist.clearRegions(); myPlaylist.load(myPlaylist.song, myPlaylist.backend.peaks); processClimaxJson(info_media.climaxJson, 'climax', 'rgb(0 0 0)', '', iconDivCez); processClimaxJson(info_media.climaxSharedJson, 'climaxshared', 'rgb(0 0 0)', '', true); //console.log("enpause!!!!!!!!!!!!!!"); setTimeout(function() { wPlayerSendEvent('PAUSE', index); myPlaylist.pause(); //console.log("DONEEEEEEEEenpause!!!!!!!!!!!!!!"); }, 100); // Appeler la fonction après la création des régions setTimeout(displayIconsOnRegions, 500); } window.setCurrentSong = function(index,type='') { if( typeof myPlaylist == 'undefined'){ return false; } //console.log("fct:setCurrentSong index"+index+" type"+type ); var playlist = myPlaylist.playlist; previousTrack = curIndex; curIndex = index; info_media = playlist[index]; //console.log("setCurrentSong",playlist); if(Pl_debug) { console.log(info_media); } $("#Pl_url").attr("href",info_media.linkalbum); $("#Pl_thumbs").attr("src",info_media.img); $("#Pl_thumbs").attr("alt",info_media.titre); $(".Pl_zone_title").attr('data-id_media',info_media.id_media); $("#Pl_title").html(info_media.titre); $("#Pl_album").html(info_media.titre_album); $("#Pl_ref").html(info_media.ref); $("#Pl_position").html(info_media.position); if(Pl_debug) { console.log("fct:setCurrentSong index"+curIndex ); } $.ajax({ url: '/jsonfy.php', type:'POST', data:'id_media='+info_media.id_media+"&ref="+info_media.ref, success: function(result_waveform){ data_peaks = (result_waveform); }, async: false }); if(from_last_click=='public'){ //YOHANNDEV a l'ouverture de la page uniquement ( chargement du 1 titre) et sur le play d'un titre ?! $('.TexteDescriptionTrackOver').removeClass('TexteDescriptionTrackOver').addClass('TexteDescriptionTrackVisited'); $(".TexteDescriptionTrack[id_media='"+ tabTitlesPage[curIndex] +"']").addClass('TexteDescriptionTrackOver'); $(".TexteDescriptionTrack[id_media='0"+ tabTitlesPage[curIndex] +"']").addClass('TexteDescriptionTrackOver'); } if(from_last_click==='private' && type !== "LOAD"){ /**espace privé**/ //init $("tr.titreprive", frames['espaceprive'].document).removeClass('titrepriveplay'); $("tr.titreprive .Tl_play", frames['espaceprive'].document).show(); $("tr.titreprive .Tl_listening", frames['espaceprive'].document).hide().removeClass('active'); //Act $("tr[id_media='"+ tabTitlesPage[curIndex] +"']", frames['espaceprive'].document).addClass('titrepriveplay'); $("tr[id_media='"+ tabTitlesPage[curIndex] +"'] .Tl_play", frames['espaceprive'].document).hide(); $("tr[id_media='"+ tabTitlesPage[curIndex] +"'] .Tl_listening", frames['espaceprive'].document).addClass('active').show(); } if(from_last_click=='composers'){ $(".compo_musique_originale").removeClass('compo_listSelected'); $(".compo_musique_originale img.button_compo_musique_originale").attr('src','/themes/cezame/assets_cezame/images/compo_mini_lectureBLACK.png'); $("#compo_musique_originale_" + tabTitlesPage[curIndex]).addClass('compo_listSelected'); $("#compo_musique_originale_" + tabTitlesPage[curIndex] +" img.button_compo_musique_originale").attr('src','/themes/cezame/assets_cezame/images/compo_mini_lectureBLUE.png'); } myPlaylist.song = info_media.mp3; myPlaylist.backend.peaks = data_peaks.data; myPlaylist.drawBuffer(); /**climax**/ myPlaylist.clearRegions(); myPlaylist.load(myPlaylist.song, myPlaylist.backend.peaks); //console.log('[loadufo]:: setCurrentSong play'); processClimaxJson(info_media.climaxJson, 'climax', 'rgb(0 0 0)', '', iconDivCez); processClimaxJson(info_media.climaxSharedJson, 'climaxshared', 'rgb(0 0 0)', '', true); if(type !== "LOAD"){ itemMonitor(); } if(Pl_debug) console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); // Appeler la fonction après la création des régions setTimeout(displayIconsOnRegions, 500); }; function processClimaxJson(jsonData, idPrefix, color, label, iconDiv='') { if (jsonData !== undefined && jsonData !== 'false' && jsonData !== '0') { let someDataFinal = []; let arrClimax = decodeURIComponent(jsonData); let arrJsonClimax = JSON.parse(arrClimax); //console.log('[loadufo]::regions '+idPrefix,arrJsonClimax); arrJsonClimax.forEach(function(objectcl, i) { // Vérifier si id_user existe, sinon assigner null var values = objectcl.timing.split(/'/); var kkeys = ["mtiming", "stiming"]; var ffinal = {}; for (var j = 0; j < values.length; j++) { ffinal[kkeys[j]] = parseInt(values[j].trim()); } var timing = ((ffinal.mtiming * 60) + ffinal.stiming); //YD 09/01/25 - end: timing + 0.2, var str = { id: idPrefix + i, start: timing, end: timing, color: color, attributes: { label: label, title: objectcl.desc, iconDiv: iconDiv, }, title: objectcl.desc, drag: false, resize: false }; someDataFinal.push(str); }); setTimeout(function() { for (var k = 0; k < someDataFinal.length; k++) { myPlaylist.addRegion(someDataFinal[k]); } }, 350); } } function displayIconsOnRegions() { const regions = document.querySelectorAll('.wavesurfer-region'); // Décoder et parser les données JSON de climaxSharedJson let arrClimax = decodeURIComponent(info_media.climaxSharedJson); let arrJsonClimax = JSON.parse(arrClimax); regions.forEach(region => { let iconSVG = region.getAttribute('data-region-icondiv'); if (iconSVG) { // Créer un élément div pour contenir l'icône let iconContainer = document.createElement('div'); let regionId = region.getAttribute('data-id'); //si iconSVG = "true" on veut juste une boite vide que l'on va remplir avec le titre. Uniquement pour les users ( a adapter ici pour plus ard) if(iconSVG== "true" && regionId && regionId.startsWith('climaxshared') ){ let index = parseInt(regionId.replace('climaxshared', '')); let objectcl = arrJsonClimax[index]; let idUser; if (objectcl && objectcl.id_user) { idUser = ''; idUser = objectcl.id_user; //console.log("iduser",idUser); }else{ idUser = ''; } iconContainer.classList.add(`iconContainer_${idUser}`); iconContainer.classList.add('wavesurfer-icon'); iconContainer.innerHTML =''; // Ajouter l'icône au conteneur parent des régions region.appendChild(iconContainer); xajax_get_user_name_by_id(idUser); }else{ iconContainer.classList.add('wavesurfer-icon'); iconContainer.innerHTML = iconSVG; // Ajouter l'icône au conteneur parent des régions region.appendChild(iconContainer); } // Positionner l'icône correctement //positionIconOnRegion(region, iconContainer); } }); } // Fonction pour positionner l'icône au-dessus de la région function positionIconOnRegion(region, iconContainer) { const regionRect = region.getBoundingClientRect(); const waveformRect = document.querySelector('#waveform').getBoundingClientRect(); iconContainer.style.position = 'absolute'; iconContainer.style.top = (regionRect.top - waveformRect.top - 40) + 'px'; // Ajustement vertical iconContainer.style.left = '50%'; // Centre horizontalement dans la région iconContainer.style.transform = 'translateX(-50%)'; iconContainer.style.pointerEvents = 'none'; // Empêche l'icône d'intercepter les clics iconContainer.style.zIndex = '10'; } /**clavier**/ var in_search = false; /**définition des touches**/ KEY_DOWN = 40; KEY_UP = 38; KEY_LEFT = 37; KEY_RIGHT = 39; KEY_END = 35; KEY_BEGIN = 36; KEY_BACK_TAB = 8; KEY_TAB = 9; KEY_SH_TAB = 16; KEY_ENTER = 13; KEY_ESC = 27; KEY_SPACE = 32; KEY_DEL = 46; KEY_A = 65; KEY_B = 66; KEY_C = 67; KEY_D = 68; KEY_E = 69; KEY_F = 70; KEY_G = 71; KEY_H = 72; KEY_I = 73; KEY_J = 74; KEY_K = 75; KEY_L = 76; KEY_M = 77; KEY_N = 78; KEY_O = 79; KEY_P = 80; KEY_Q = 81; KEY_R = 82; KEY_S = 83; KEY_T = 84; KEY_U = 85; KEY_V = 86; KEY_W = 87; KEY_X = 88; KEY_Y = 89; KEY_Z = 90; KEY_PF1 = 112; KEY_PF2 = 113; KEY_PF3 = 114; KEY_PF4 = 115; KEY_PF5 = 116; KEY_PF6 = 117; KEY_PF7 = 118; KEY_PF8 = 119; REMAP_KEY_T = 5019; function checkEventObj ( _event_ ){ // --- IE explorer if ( window.event ) return window.event; // --- Netscape and other explorers else return _event_; } /**fonctions pour catcher les flèches gauches et droite, à appliquer sur la liste de **/ function applyKey (_event_){ if(in_search==true) { return; } // --- Retrieve event object from current web explorer var winObj = checkEventObj(_event_); var intKeyCode = winObj.keyCode; var intAltKey = winObj.altKey; var intCtrlKey = winObj.ctrlKey; // 1° --- Access with [ALT/CTRL+Key] if (intAltKey || intCtrlKey) { if ( intKeyCode == KEY_RIGHT || intKeyCode == KEY_LEFT ){ // --- Display Message if(intKeyCode == KEY_RIGHT){ getNextTitle(); } if(intKeyCode == KEY_LEFT){ getPrevTitle(); } sendEvent('ITEM',curIndex); // 3° --- Map the keyCode in another keyCode not used winObj.keyCode = intKeyCode = REMAP_KEY_T; winObj.returnValue = false; return false; } } // 2 ° --- Access without [ALT/CTRL+Key] else { if ( intKeyCode == KEY_RIGHT || intKeyCode == KEY_LEFT ){ // --- Display Message if(intKeyCode == KEY_RIGHT){ getNextTitle(); } if(intKeyCode == KEY_LEFT){ getPrevTitle(); } jPlayerSendEvent('ITEM',curIndex); // 3° --- Map the keyCode in another keyCode not used winObj.keyCode = intKeyCode = REMAP_KEY_T; winObj.returnValue = false; return false; } } } function clickFormeTiming(e,that, offset){ return; var x = e.clientX - offset - 8.5; var duration = parseInt(myPlaylist.getDuration()); var duration_finale; duration_finale=duration; w=(parseInt(duration_finale) / visual_width) * x; w=parseInt(w); wPlayerSendEvent('SEEK', w ); if(!myPlaylist.isPlaying() && myPlaylist.getCurrentTime()>0){ wPlayerSendEvent('PLAY',false); } } function clickForme(e,that){ return; var offset = that.offset(); var x = e.clientX - offset.left + 5; var duration = parseInt(myPlaylist.getDuration()); var duration_finale; duration_finale=duration; w=(parseInt(duration_finale) / visual_width) * x; w=parseInt(w); wPlayerSendEvent('SEEK', w ); if(!myPlaylist.isPlaying() && myPlaylist.getCurrentTime()>0){ wPlayerSendEvent('PLAY',false); } } function initialesVersCouleur(initiales) { // Assurez-vous que la chaîne a exactement 2 caractères en majuscules initiales = initiales.toUpperCase().substring(0, 2); // Liste réduite des 7 couleurs principales Web Safe const safeWebColors = [ '#000000', // Noir '#FF0000', // Rouge '#00FF00', // Vert '#0000FF', // Bleu '#FFFF00', // Jaune '#FF00FF', // Magenta '#00FFFF' // Cyan ]; // Calcule un index basé sur les initiales const index = (initiales.charCodeAt(0) + initiales.charCodeAt(1)) % safeWebColors.length; // Retourne la couleur correspondante return safeWebColors[index]; } --> fonction searchExternalRecommendation() mise dans l'element directement // $('#btn_search_external_recommendation_youtube').on('click', function() { // searchExternalRecommendation(document.getElementById('search_external_recommendation_youtube').value); // }); function searchExternalRecommendation(url) { var p = /^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/i; var p2 =/^(?:https?:\/\/open\.spotify\.com|spotify)/i; var p3 =/^(?:https?:\/\/.*soundcloud.com\/)/i; var p4 =/^(?:https?:\/\/.*disco.ac\/)/i; var tab_url = url.split('?'); url = tab_url[0]; var v_param = ""; if ( tab_url[1] ) { var params_get = tab_url[1].split('&'); for (let i = 0; i < params_get.length; i++) { var tmp_param = params_get[i].split('='); if ( tmp_param[0] == 'v' ) { v_param = tmp_param[1]; } } } url = url + (v_param != "" ? "?v=" + v_param : ""); let logged_in = false; jQuery.ajax({url: "/ajax/check_conn.php", type: "GET", async: false, success: function(JSONreponseFromAjax){ logged_in = JSONreponseFromAjax; }} ); if (1==1 || logged_in == "OK" ) { if((url.match(p) || url.match(p2) || url.match(p3) || url.match(p4)) && !launch_yt_progress){ if(url.match(p)){ var providerURL = "Youtube URL"; }else if(url.match(p2)){ var providerURL = "Spotify URL"; }else if(url.match(p3)){ var providerURL = "SoundCloud URL"; }else if(url.match(p4)){ var providerURL = "Disco URL"; }else{ var providerURL = "Youtube URL"; } var message = providerURL + " :
" + "La scansione potrebbe richiedere alcuni secondi di attesa. Vuoi continuare ?"; var topito = jQuery('#header-search-query').offset(); $('#searchbtn').prop('disabled', true); jcConfirm( message, function(){ if(url.match(p)){ /**clean the url before sending it to alain**/ url=url.replace(/\?si=.*$/,''); } launch_yt_progress=true; ///////////$('progress').show(); $('progress').hide(); spinnerStartCancellable(); //////////randomBar( ); jq_xhr.reset(); jq_xhr.addCancelCallback(resetSearchExternalRecommendation); jq_xhr.instance = $.ajax({url: "https://cdn.cezamemusic.com/recog/upload.php", type: "GET", data: {url: url}, success: function(JSONreponseFromAjax){ resetSearchExternalRecommendation(); $('#searchbtn').prop('disabled', false); if(JSONreponseFromAjax=="ERR"){ getAlert("C'è stato un errore","header-search-query"); clearTimeout(mytimeoutrb); progress = document.getElementById('uploadprogress'); progress.value = progress.innerHTML = 0; ///////////$('progress').show(); $('progress').hide(); // $('.external_recommendationbox')[0].style.display = 'none'; }else if(JSONreponseFromAjax=="ERR_NOT_CONNECTED"){ //jQuery('#infoBoxListePage_connect').show(); TipNotConnected(); $('progress').hide(); // $('.external_recommendationbox')[0].style.display = 'none'; }else if(JSONreponseFromAjax.match(/^ERR_/)){ $('progress').hide(); // $('.external_recommendationbox')[0].style.display = 'none'; }else{ clearTimeout(mytimeoutrb); progress = document.getElementById('uploadprogress'); progress.value = progress.innerHTML = 0; ///////////$('progress').show(); $('progress').hide(); /** SG 20/10/2021 : ajout pour cacher la box après requête et vider le champs **/ // $('#search_external_recommendation_youtube').val(''); // $('.external_recommendationbox').hide(); reponses = JSON.parse(JSONreponseFromAjax); reponsesMots = reponses.mots; JSONreponse = JSONreponseFromAjax; suggestiontitres(url,'yt'); } }, error: function(res, textStatus, errorThrown){ resetSearchExternalRecommendation(); if (textStatus !== 'abort') { var text_alert = "An error occured, please try again later"; //if (errorThrown.search(/time[- ]?out/i) !== -1) // text_alert += ".
Error : Processing time limit exceeded"; getAlert(text_alert); } } }); }, function(){ jQuery('#header-search-query').val(''); }, "continuare", "Annulla", {} ); } } else { TipNotConnectedPubAi(true); } } function searchExternalRecommendationFromBrief(brief) { let logged_in = false; spinnerStart(); jQuery.ajax({url: "/ajax/check_conn.php", type: "GET", async: true, success: function(JSONreponseFromAjax){ logged_in = JSONreponseFromAjax; }} ); /**pour les tests on rend la fonction accessible (demo) */ if ( 1==1 || logged_in == "OK" ) { jQuery.ajax({ url: "/ajax/get_keywords_from_brief.php", type: "POST", data: { brief : brief }, dataType: "html", async: true, success: function(JSONreponseFromAjax){ var parsedRes = JSON.parse(JSONreponseFromAjax); var div_error = document.getElementById('external_brief_errors'); if ( parsedRes.error !== undefined ) { var txt_error = "Error : "; if ( parsedRes.error == "brief_empty" ) { txt_error += "Your brief is empty"; } else if ( parsedRes.error == "brief_too_long" ) { txt_error += "Your brief is too long, it must be 1000 characters long maximum"; } div_error.innerHTML = txt_error; div_error.style.display = 'block'; spinnerStop(); } else { div_error.innerHTML = ''; div_error.style.display = 'none'; var responseJSON = parsedRes; var response = responseJSON; var url = "/liste_resultats.php?"; resetSearchExternalRecommendation(); var params = []; var tab_mots = []; //var nbi = 1; //for( var key in response ) { for( var valou of response ) { //if(nbi < 5){ //params.push("mot[]=" + encodeURI(response[key] + "@@@@" + response[key] + "@@@@" + response[key])); params.push("mot[]=" + encodeURI(valou + "@@@@" + valou + "@@@@" + valou)); //tab_mots.push(response[key]); tab_mots.push(valou); //} //nbi++; } if ( params.length == 0 ) { div_error.innerHTML = 'No results found, please try again later.'; div_error.style.display = 'block'; spinnerStop(); return; } url += params.join("&"); xajax_check_multiple_words(tab_mots.join(' '), [], false, true, false, brief); //window.location.href = url; } } } ); } else { TipNotConnectedPubAi(true); spinnerStop(); } } function resetSearchExternalRecommendation() { spinnerStopCancellable(); launch_yt_progress = false; $('#search_external_recommendation_youtube').val(''); $('.external_recommendationbox').hide(); } /** SG 20/10/2021 : RAJOUT POUR LE FILE AREA DE L'EXTERNAL RECOMMENDATION **/ $("#file_external_recommendation").on("change", function(e) { let logged_in = false; jQuery.ajax({url: "/ajax/check_conn.php", type: "GET", async: false, success: function(JSONreponseFromAjax){ logged_in = JSONreponseFromAjax; }} ); if (1==1 || logged_in == "OK" ) { spinnerStart(); var lbl_external = document.getElementById('file_external_recommendation_lbl'); var old_txt = lbl_external.innerHTML; lbl_external.innerHTML = e.target.files[0].name; if ( !e.target.files[0].name ) { return; } var fileExtension = e.target.files[0].name.split('.').pop(); if ( accepted_files.includes(fileExtension.toLowerCase())){ if ( accepted_files_music.includes(fileExtension.toLowerCase())){ readfiles(e.target.files); }else{ readfiles_image(e.target.files); } } else { spinnerStop(); $('#progress_external_recommendation_file').hide(); getAlertDanger("Only MP3, WAV, AIFF, JPG and PNG files are accepted"); lbl_external.innerHTML = old_txt; e.target.files = null; } } else { TipNotConnectedPubAi(true); } }); //--- //- FUNCTIONS!! //--- //--- //- autocomplete EXPLICATION : lance l'autocomplete sur la recherche quand un titre est directement renseigne, suggestion //--- var svg_header_search_query = ""; /////////jQuery('#header-search-query').val(); /**************EV 19/01/2021 : retiré de la recherche if($("#header-search-query").length > 0) $("#header-search-query").autocomplete({ source: "/ajax/searchv4.php", position: { my: "left+0 top+2" }, create: function(){ $(this).data('ui-autocomplete')._renderItem = function (ul, item) { svg_header_search_query = jQuery('#header-search-query').val(); item.label = item.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(this.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); return $("
  • ") .addClass("ac-li_"+item.type) .data("item.autocomplete", item) .append("" + item.label + "") .appendTo(ul); }; }, focus: function( event, ui ) { if(ui.item.txt!='') { $("#header-search-query").val(ui.item.txt); //svg_header_search_query = jQuery('#header-search-query').val(); }else{ $("#header-search-query").val(svg_header_search_query); } return false; }, select: function( event, ui ) { if(ui.item.url!='' && ui.item.url!='#'){ document.location.href=ui.item.url; } return false; }, response: function( event, ui ) { if(ui.content!=null){ //launchSearch(); } } }).autocomplete( "widget" ).addClass( "autocomplete_search_page" ); ******/ //--- //- recog clickOnTag //--- clickOnTag = function(el){ //////empty_search_form(); spinnerStart(); var inz = el.find('input'); if(el.hasClass('recogbuttondisabled')) { /**ne rien faire, sortir de cette fonction, car le mot n'est pas sélectionnable**/ return null; }else if(el.hasClass('recogbuttonselected')){ inz.prop('disabled', true); el.removeClass('recogbuttonselected').addClass('recogbuttondefault'); }else if(el.hasClass('recogbuttondefault')){ inz.prop('disabled', false); el.removeClass('recogbuttondefault').addClass('recogbuttonselected'); } jQuery('.recogbutton').each(function(){jQuery(this).removeClass('recogbuttondisabled').addClass('recogbuttondefault');}); //xajax_get_recog_results_keywords(xajax.getFormValues('alain_search_form'),$('#recogtags').html(),JSONreponse); xajax_get_recog_results_keywords(xajax.getFormValues('alain_search_form'),'',JSONreponse); } //--- //- recog launch_recog_search //--- launch_recog_search = function(){ var zurl=""; var taburl = [ ]; taburl.push("last_item_played=" + global_last_item_played); taburl.push("type_suggestion=" + global_type_suggestion); jQuery('.recogbutton').each(function(){ /**verifier si disabled ou pas**/ if(jQuery(this).hasClass('recogbuttonselected')){ var zinput=jQuery(this).find('input'); taburl.push( zinput.attr('name') + "=" + zinput.val() ); } }); similartracks=JSON.parse(JSONreponse); similartracks=similartracks.similartracks; if(similartracks.length > 0){ tabids=new Array(); for(var i=0;i" + "" + lib + "" tagz.push(tag); } } strz+=""; $('#cartouche-similar_content').html(strz); //$('#search_form').append(strz); /*$('#recogtags').css('margin-top', (0 - ($('#recogtags').css('height')/2)) + 'px');*/ /**mémoriser le grid**/ //xajax_get_recog_results_keywords(xajax.getFormValues('search_form'),$('#recogtags').html(),JSONreponse); //xajax_get_recog_results_tracks(xajax.getFormValues('search_form'),$('#recogtags').html()); } //--- //- recog suggestionmots //--- suggestionmots = function(){ jQuery('#recogtags').show(); //jQuery('.recogbutton').each(function(){ //jQuery(this).removeClass("recogbuttonselected").addClass("recogbuttondefault"); //jQuery(this).find('input').removeAttr('disabled'); //}); //xajax_get_recog_results_keywords(xajax.getFormValues('search_form'),$('#recogtags').html(),JSONreponse); } var global_last_item_played; var global_type_suggestion; //--- //- recog suggestiontitres //--- suggestiontitres = function(last_item_played,type_suggestion){ /** last_item_played : le titre de réference sur une recommendation (signe égal) type_suggestion : (equal,yt,mp3) **/ global_last_item_played=last_item_played; global_type_suggestion=type_suggestion; //xajax_get_recog_results_tracks(xajax.getFormValues('alain_search_form'),$('#recogtags').html(),JSONreponse, last_item_played, type_suggestion); xajax_get_recog_results_tracks(xajax.getFormValues('alain_search_form'),'',JSONreponse, last_item_played, type_suggestion); } //--- //- recog previewfile //--- previewfile = function (file) { if (tests.filereader === true && acceptedTypes[file.type] === true) { var reader = new FileReader(); reader.onload = function (event) { }; reader.readAsDataURL(file); } else { holder.innerHTML += '

    Loading ' + file.name + ' ' + (file.size ? (file.size/1024|0) + 'K' : ''); fichier=file.name; } } //--- //- recog readfiles //--- readfiles = function(files) { var formData = tests.formdata ? new FormData() : null; for (var i = 0; i < files.length; i++) { if (tests.formdata) formData.append('file', files[i]); // previewfile(files[i]); en commentaire pcq nom du fichier pas important et pas beau } // now post a new XHR request if (tests.formdata) { var xhr = new XMLHttpRequest(); xhr.open('POST', '/recog/upload.php'); xhr.onload = function() { progress.value = progress.innerHTML = 100; }; xhr.onloadend = function() { JSONreponse= xhr.responseText.trim(); if(JSONreponse=="ERR"){ spinnerStopCancellable(); $('#progress_external_recommendation_file').hide(); document.getElementById('file_external_recommendation').files = null; document.getElementById('file_external_recommendation_lbl').innerHTML = 'Choose file from your computer'; getAlertDanger("An error has occured, please try again with another file"); }else if(JSONreponse=="ERR_NOT_CONNECTED"){ //jQuery('#infoBoxListePage_connect').show(); TipNotConnected(); }else{ $('#fichiercharge').remove(); $('#chargementde').remove(); $('progress').hide(); spinnerStop(); reponses = JSON.parse(JSONreponse); reponsesMots = reponses.mots; suggestiontitres(files[0].name, 'mp3'); /** SG 21/10/2021 : POUR CACHER LA BOX QD RESULTAT AFFICHÉ **/ if($('.external_recommendationbox').length){ /** SG 22/10/2021 : POUR PROGRESS BAR EXTERNAL_RECOMMENDATION **/ $('#progress_external_recommendation_file').width('100%'); $('.external_recommendationbox').hide(); $('#progress_external_recommendation_file').width('0%'); $('#progress_external_recommendation_file').hide(); $('#file_external_recommendation').val(''); document.getElementById('file_external_recommendation_lbl').innerHTML = 'Drop your file here.'; } } }; if (tests.progress) { $('progress').show(); $('#progress_external_recommendation_file').show(); spinnerStart(); xhr.upload.onprogress = function (event) { if (event.lengthComputable) { var complete = (event.loaded / event.total * 100 | 0); if(complete!=100){ $('#recogdiv').each(function(){$(this).remove();}); } /** SG 22/10/2021 : PR PROGRESS BAR EXTERNAL_RECOMMENDATION **/ if($('#progress_external_recommendation_file').length){ $('#progress_external_recommendation_file').width((event.loaded/event.total*100)+'%'); } progress.value = progress.innerHTML = complete; } } } xhr.send(formData); } } //--- //- recog readfiles //--- readfiles_image = function(files) { var formData = tests.formdata ? new FormData() : null; for (var i = 0; i < files.length; i++) { if (tests.formdata) formData.append('file', files[i]); // previewfile(files[i]); en commentaire pcq nom du fichier pas important et pas beau } // now post a new XHR request if (tests.formdata) { var xhr = new XMLHttpRequest(); xhr.open('POST', '/ajax/get_keywords_from_brief.php'); xhr.onload = function() { progress.value = progress.innerHTML = 100; }; xhr.onloadend = function() { JSONreponse= xhr.responseText.trim(); if(JSONreponse=="ERR"){ spinnerStopCancellable(); $('#progress_external_recommendation_file').hide(); document.getElementById('file_external_recommendation').files = null; document.getElementById('file_external_recommendation_lbl').innerHTML = 'Choose file from your computer'; getAlertDanger("XXXXXAn error has occured, please try again with another file"); }else if(JSONreponse=="ERR_NOT_CONNECTED"){ //jQuery('#infoBoxListePage_connect').show(); TipNotConnected(); }else{ $('#fichiercharge').remove(); $('#chargementde').remove(); $('progress').hide(); spinnerStop(); var parsedRes = JSON.parse(JSONreponse); var div_error = document.getElementById('external_brief_errors'); if ( parsedRes.error !== undefined ) { var txt_error = "Error : "; if ( parsedRes.error == "brief_empty" ) { txt_error += "Your brief is empty"; } else if ( parsedRes.error == "brief_too_long" ) { txt_error += "Your brief is too long, it must be 1000 characters long maximum"; } div_error.innerHTML = txt_error; div_error.style.display = 'block'; spinnerStop(); } else { div_error.innerHTML = ''; div_error.style.display = 'none'; var responseJSON = parsedRes; var response = responseJSON; var url = "/liste_resultats.php?"; var params = []; var tab_mots = []; for( var valou of response ) { params.push("mot[]=" + encodeURI(valou + "@@@@" + valou + "@@@@" + valou)); tab_mots.push(valou); } if ( params.length == 0 ) { div_error.innerHTML = 'No results found, please try again later.'; div_error.style.display = 'block'; spinnerStop(); return; } url += params.join("&"); xajax_check_multiple_words(tab_mots.join(' '), [], false, true, false, ''); //window.location.href = url; } } }; if (tests.progress) { $('progress').show(); $('#progress_external_recommendation_file').show(); spinnerStart(); xhr.upload.onprogress = function (event) { if (event.lengthComputable) { var complete = (event.loaded / event.total * 100 | 0); if(complete!=100){ $('#recogdiv').each(function(){$(this).remove();}); } /** SG 22/10/2021 : PR PROGRESS BAR EXTERNAL_RECOMMENDATION **/ if($('#progress_external_recommendation_file').length){ $('#progress_external_recommendation_file').width((event.loaded/event.total*100)+'%'); } progress.value = progress.innerHTML = complete; } } } xhr.send(formData); } } //--- //- afficherPanneauEntree //--- afficherPanneauEntree = function(){ var zeObj = $('#header-search-query'); if(zeObj.val()!=""){ $('#boiteAdviceRico').show(500); } } //--- //- jelancenoresult //--- jelancenoresult = function(){ in_search=false; $('#msgdbg').text($("#header-search-query").attr('value')); spinnerStart(); //xajax_check_multiple_words($("#header-search-query").attr('value'), xajax.getFormValues('search_form')); }; var mytimeoutrb; var randomPercent = 0 randomBar = function( ){ randomPercent = randomPercent + 5 if(randomPercent > 100) { randomPercent = 0 } progress = document.getElementById('uploadprogress'); progress.value = progress.innerHTML = randomPercent; mytimeoutrb = setTimeout( function(){randomBar( );} , 300); } todoOnKeyDown = function(zeObj,e){ $carousel_gallery_home.flickity('pausePlayer'); /** le moteur suggest est désactivé quand on tape une touche, cela empeche le masque "Entrée" de s'afficher, et lance le timeout de 3 secondes pour l'ouvrir **/ spinnerStop(); clearTimeout(timeoutAfficherPanneauEntree); in_search=true; timeoutAfficherPanneauEntree = setTimeout(function(){afficherPanneauEntree();},3000); //var kc=e.keyCode; var kc = e.key || e.code; if(kc=="Enter" || kc==13 || kc==37 || kc==38 || kc==39 || kc==40 || zeObj.value=='' || zeObj.value.indexOf('?+')!=-1){ spinnerStop(); } if($('#btn_external_recommendation').length > 0){ /** SG 21/20/2021 : POUR CACHER BOUTON external_recommendation QD QQUE CHOSE DE TAPER **/ if((zeObj.value).length>0){ /////16/04/2024 Eric / on ne le retire plus. : document.getElementById('btn_external_recommendation').style.display = 'none'; }else{ document.getElementById('btn_external_recommendation').style.display = 'flex'; } } if(( kc==13 || kc=='Enter') && zeObj.value!='' ){ var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); if(r!=''){ var phrase=r + ' ' + zeObj.value; }else{ var phrase=zeObj.value; } $.ajax({ type: "POST", url: "/ajax/check_is_prompt.php", data: { phrase: phrase, langue: 'it' } }).done(function(reponse) { if (reponse === "OK") { /**vider le formulaire de recherche**/ empty_search_form(); /**appeler la fonction de recommandation par brief**/ searchExternalRecommendationFromBrief(phrase); } else { //bouton entrée tappé fct_menuzonehidden(); spinnerStart(); clearTimeout('jelancelenoresultdansxsecondes'); xajax_check_multiple_words(phrase, xajax.getFormValues('search_form')); } }); }else if(( kc==13 || kc=='Enter') && zeObj.value==''){ fct_menuzonehidden(); } } todoOnBlur = function(zeObj,e){ var v = zeObj.value; $carousel_gallery_home.flickity('pausePlayer'); spinnerStop(); clearTimeout(timeoutAfficherPanneauEntree); in_search=true; timeoutAfficherPanneauEntree = setTimeout(function(){afficherPanneauEntree();},3000); spinnerStop(); /** SG 24/10/2023 : POUR CACHER BOUTON external_recommendation QD QQUE CHOSE DE TAPER **/ if($('#btn_external_recommendation').length > 0){ if((zeObj.value).length>0){ /////16/04/2024 Eric / on ne le retire plus. : document.getElementById('btn_external_recommendation').style.display = 'none'; }else{ document.getElementById('btn_external_recommendation').style.display = 'flex'; } } if(v!=''){ fct_menuzonehidden(); spinnerStart(); clearTimeout('jelancelenoresultdansxsecondes'); zeObj.value = ''; var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); var phrase = ''; if ( r!='' ) { phrase = r + ' ' + v; } else { phrase = v; } $.ajax({ type: "POST", url: "/ajax/check_is_prompt.php", data: { phrase: phrase, langue: 'it' } }).done(function(reponse) { if (reponse === "OK") { /**vider le formulaire de recherche**/ empty_search_form(); /**appeler la fonction de recommandation par brief**/ searchExternalRecommendationFromBrief(phrase); } else { //bouton entrée tappé fct_menuzonehidden(); spinnerStart(); clearTimeout('jelancelenoresultdansxsecondes'); xajax_check_multiple_words(phrase, xajax.getFormValues('search_form')); ////////show_bpm_key_zone("search"); } }); } else { //fct_menuzonehidden(); //remettre cette ligne si problème sur le onblur //SG 03/11/2023 : afin que la cartouche ne se ferme plus au onblur de l'input et que le bouton ai search se cache quand des mots sont présents dans l'input var r = $(".text-tags .text-label").map( function(){return $(this).text();}).get().join(' '); if ( r!="" ) { /////16/04/2024 Eric / on ne le retire plus. : $("#btn_external_recommendation").hide(); } else { if (document.getElementsByClassName('recogbutton').length == 0) { fct_menuzonehidden(); } } } } //Tooltip sur liste track search v4 pour les recommandations tooltip_menu_media = function(button,id_media,content){ //CONTENT:: id="tooltiprecommandation_053887" const $tooltip = $("#"+content+"_" + id_media); if ($tooltip.length === 0) { console.error("Tooltip element not found:", "#" + content + "_" + id_media); return; } jcAlertTT($tooltip.html(), {boxWidth: 'calc(600px + 10%)',theme: 'cez-tooltiprecommandation', draggable: true, backgroundDismiss: false} ); $(document).on("mousedown", function (e) { const modalBackdrop = $(".jconfirm-cez-tooltiprecommandation .jconfirm-cell"); // Cible uniquement le backdrop de la modale if (modalBackdrop.is(e.target)) { // Vérifie que le clic est strictement sur le backdrop $tooltip.find('.Ttr_timingdebut').val(''); $tooltip.find('.Ttr_timingfin').val(''); fctclearRegions(); } }); //on charge pour ce contenu le code pour la region if(content === "tooltiprecommandation"){ from_last_click ="recommandationedit"; if (!myPlaylist || typeof myPlaylist.playlist !== 'object') { //console.error("myPlaylist.playlist n'est pas un objet valide."); return; } //console.log("",myPlaylist.playlist); //! Cas ajaxify surtout, où le titre du player ne fait pas parti de la liste de lecture de la page nouvellement affichée // Vérifier si l'id_media est présent dans la playlist const idExistsInPlaylist = myPlaylist.playlist.some( item => String(item.id_media) === id_media ); if (!idExistsInPlaylist) { // Récupérer les IDs dans l'attribut onclick du bouton Tl_play let $parentTr = $(button).closest('tr'); let $parentUl = $parentTr.find('td:first ul.boxcontroleplayer'); let id_mediaAttr = $parentUl.attr('id_media'); let positionAttr = $parentUl.attr('position'); let onclickAttr = $parentUl.find("button.Tl_play").attr("onclick"); console.log(id_mediaAttr+" pos"+positionAttr); // Extraire les IDs avec une expression régulière let match = onclickAttr.match(/PlayPauseUnTitreButton\('([^']+)'/); if (match && match[1]) { let idsList = match[1]; xajax_load_player_playlist(idsList,0,positionAttr,from_last_click,"oui"); } }else{ //! Si le titre existe dans la playlist, c'est que la page a été rechargé. Ici 2 problematiques, soit on a cliqué sur un bouton de lecture de la liste de titre et on a prechargé une playlist contenant les alernates, ou bien c'est une version playlist allegée //--playlist avec les alernates if (String(id_media).startsWith("0")) { id_media_alt = String(id_media).slice(1); // Supprime le premier caractère pos = $('#boxcontrol_'+id_media_alt).attr('curposition'); //--sinon c'est la playlist allegée }else{ const playlistValues = Object.values(myPlaylist.playlist); // Rechercher l'index const index = myPlaylist.playlist.findIndex( item => String(item.id_media) === id_media ); //console.log("Index trouvé :", index, "Données :", playlistValues); if (index !== -1) { const currentItem = playlistValues[index]; pos = index; } } window.setCurrentSongLOAD(pos); } setTimeout(() => { let dureetrack = $("#time-total").html(); let [minutesDT, secondsDT] = dureetrack.split(':').map(Number); let newseconds = (minutesDT * 60) + secondsDT; window.createRegion('0', newseconds, 'false', 'false', '', 'recommandation_' + id_media); jQuery('.wavesurfer-handle-start').css('width','4px').css('background-color','#222222'); jQuery('.wavesurfer-handle-end').css('width','4px').css('background-color','#222222'); }, 150); $(document).on("click", ".Ttr_validate", function (e) { let timingdebut = $tooltip.find('.Ttr_timingdebut').val(); let timingfin = $tooltip.find('.Ttr_timingfin').val(); //console.log(timingdebut+" "+timingfin+" Suivant"); //launch_recommendation('https://stream.cezamemusic.com/albums/CEZ4382/mp3/128/16-Mi-Corazon-Alternate.mp3','053887');" }); $(document).on("click", ".Ttr_cancel", function (e) { $tooltip.find('.Ttr_timingdebut').val(''); $tooltip.find('.Ttr_timingfin').val(''); $('.jconfirm-cez-tooltiprecommandation .jconfirm-closeIcon').trigger("click"); fctclearRegions(); }); } } launch_recommendation = function(localurl,last_item_played, debut=null, fin=null){ let logged_in = false; jQuery.ajax({url: "/ajax/check_conn.php", type: "GET", async: false, success: function(JSONreponseFromAjax){ logged_in = JSONreponseFromAjax; }} ); var cookiepubai = document.cookie.match('(^|;) ?no_pub_ai=([^;]*)(;|$)'); var test_pubai = false; if ( cookiepubai !== null ) { test_pubai = cookiepubai[2]; } //SG 14/11/2023 : si pas connecté, on affiche la popup de pub pour les fonctionnalités complémentaires de l'IA // if ( logged_in != "OK" && !test_pubai ) { ///pour l'instant on met ça de côté ... TipNotConnectedPubAi(false); // } $('progress').hide(); spinnerStart(); /**on supprime le div de recog, vu que l'on va en charger un nouveau**/ jQuery('#recogdiv').remove(); if ( !$('body').hasClass('mobile') ) { randomBar( ); } if (debut !== null && fin !== null && Number.isFinite(debut) && Number.isFinite(fin)) { paramjson = {localurl: localurl, id_media: last_item_played, debut: debut, fin: fin}; }else{ paramjson = {localurl: localurl, id_media: last_item_played}; } jQuery.ajax({url: "/recog/upload.php", type: "POST", data : paramjson, success: function(JSONreponseFromAjax){ if(JSONreponseFromAjax=="ERR"){ $('progress').hide(); spinnerStop(); }else if(JSONreponseFromAjax=="ERR_NOT_CONNECTED"){ TipNotConnected(); $('progress').hide(); spinnerStop(); }else if(JSONreponseFromAjax.match(/^ERR_/) ){ $('progress').hide(); spinnerStop(); clearTimeout(mytimeoutrb); }else { clearTimeout(mytimeoutrb); if ( !$('body').hasClass('mobile') ) { progress = document.getElementById('uploadprogress'); progress.value = progress.innerHTML = 0; } jQuery('progress').hide(); spinnerStop(); reponses = JSON.parse(JSONreponseFromAjax); reponsesMots = reponses.mots; JSONreponse = JSONreponseFromAjax; suggestiontitres(last_item_played,'equal'); } } }); } // Fonction pour obtenir le début et la fin d'une région spécifique function getRegionTiming(idMedia) { // Supposons que votre instance WaveSurfer est dans la variable 'wavesurfer' const regionId = 'recommandation_' + idMedia; const regionKey = hasRegionStartingWith(); let region = null; //ne jamais clear les (climax[0-9]) //if(regionKey.some(item => item.startsWith('climax'))){ if(regionKey){ regionKey.forEach(key => { if(key==regionId){ region=myPlaylist.regions.list[key]; } }); } if (region!=null) { return { start: region.start, // Début en secondes end: region.end // Fin en secondes }; } return { start: null, // Début en secondes end: null // Fin en secondes }; } //--- //- changeScrollHeight //--- changeScrollHeight = function() { var h = parseInt(window.prompt('Please type new scroll height (number in pixels):', jQuery.Autocompleter.defaults.scrollHeight)); if(h > 0) { $("#suggest1").setOptions({ scrollHeight: h }); } } //--- //- focus_header_search_query //--- focus_header_search_query = function(){ //$("#header-search-query").trigger("activate.autocomplete"); $("#header-search-query").click(); } //--- //- RemoveAccents //--- RemoveAccents = function(strAccents) { var strAccents = strAccents.split(''); var strAccentsOut = new Array(); var strAccentsLen = strAccents.length; var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz"; for (var y = 0; y < strAccentsLen; y++) { if (accents.indexOf(strAccents[y]) != -1) { strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); } else strAccentsOut[y] = strAccents[y]; } strAccentsOut = strAccentsOut.join(''); //return strAccentsOut.replace(/ +/,"-"); strAccentsOut=strAccentsOut.replace(/'/g,"-").replace(/&+/g," ").replace(/ +/g,"-").replace(/\-+/,'-'); return strAccentsOut; } //--- //- addAlbumAndLaunch //--- addAlbumAndLaunch = function(id_album,e,f){ e.after(""); f.submit(); } //--- //- launchSearch //--- launchSearch = function(){ jQuery('.loupe').click(); } /**tout ce qui se rapoporte au filtrage par bpm et key**/ load_bpm_key_slider = function(){ jQuery('#slider').slider({ range: true, min: 10, max: 300, step: 1, values: [ 10, 300 ], slide: function( event, ui ) { jQuery('.slider-min').html(ui.values[ 0 ]); jQuery('.slider-max').html(ui.values[ 1 ]); }, change: function( event, ui ) { var min = ui.values[ 0 ]; var max = ui.values[ 1 ]; jQuery('#customFilterBpm').val(''); jQuery.ajax({ url: '/ajax/ajax_search_filters.php?minbpm='+min+'&maxbpm='+max} ).done(function(){ var only_word_search = jQuery('#search_form').serialize().replace('search_external_recommendation_youtube=&search_external_recommendation_brief=', ''); const url_params = new URLSearchParams(window.location.search); const id_media_str = url_params.get('id_media_str'); var tmp_url = ""; if ( id_media_str !== null ) { tmp_url = '/liste_resultats.php?id_media_str='+id_media_str+'&randkeybpm='+Math.random().toString(36).substring(7); }else if(only_word_search!=''){ tmp_url = '/liste_resultats.php?'+jQuery('#search_form').serialize()+'&randkeybpm='+Math.random().toString(36).substring(7); } goLaunchAjaxify(tmp_url,'#searchlink','search_' + Math.random().toString(36).substring(7)); }); } }); } -->