1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
| PRIVATE TextArea1 AS TextArea PRIVATE DrawingArea1 AS DrawingArea PRIVATE ToggleButton1 AS ToggleButton PRIVATE mp AS MediaPlayer PRIVATE Meta AS NEW Collection PRIVATE ss AS NEW String[] PUBLIC SUB Form_Open() ME.Resize(Screen.AvailableWidth * 0.33, Screen.AvailableHeight * 0.73) WITH TextArea1 = NEW TextArea(ME) .X = ME.W * 0.02 .Y = ME.H * 0.02 .W = ME.W * 0.96 .H = ME.H * 0.4 END WITH WITH DrawingArea1 = NEW DrawingArea(ME) .X = ME.W * 0.02 .Y = ME.H * 0.43 .W = ME.W * 0.96 .H = ME.H * 0.46 END WITH WITH ToggleButton1 = NEW ToggleButton(ME) AS "ToggleButton1" .W = ME.W * 0.3 .X = (ME.W * 0.5) - (.W / 2) .Y = ME.H * 0.9 .H = ME.H * 0.08 .Foreground = Color.Green .Text = "Start" END WITH END PUBLIC SUB ToggleButton1_Click() IF ToggleButton1.Value THEN DIM plugVis AS MediaControl DIM tipoPlug AS String[] = ["goom", "monoscope", "spacescope", "spectrascope", "synaescope", "wavescope"] TextArea1.Clear WITH mp = NEW MediaPlayer AS "MediaPlayer1" plugVis = NEW MediaControl(mp, tipoPlug[3]) .SetWindow(DrawingArea1) ' Écoutons une webradio...... .URL = "https://icy.unitedradio.it/VirginRock70.mp3" ' Si nous voulons lire un fichier audio ou vidéo, nous devons remplacer la ligne précédente par celle-ci: ' .URL = Media.URL("/Chemin/d'accès/au/fichier/audio/ou/vidéo") .Play .Video.Visualisation = plugVis END WITH ToggleButton1.Foreground = Color.Red ToggleButton1.Text = "Stop" ELSE mp.Stop mp.Close ToggleButton1.Foreground = Color.Green ToggleButton1.Text = "Start" ENDIF END PUBLIC SUB MediaPlayer1_Tag(tagList AS MediaTagList) FOR EACH tag AS STRING IN tagList.Tags IF NOT Meta.Exist(tag) THEN Meta[tag] = tagList[tag] ss.Push(tag) ss.Push(tagList[tag]) ELSE ss[ss.Find(tag) + 1] = tagList[tag] ENDIF NEXT TextArea1.Clear FOR c AS SHORT = 0 TO ss.Max STEP 2 TextArea1.Text &= ss[c] & ": " & ss[c + 1] & gb.NewLine NEXT END PUBLIC SUB MediaPlayer1_Position() ME.Title = Str(Time(0, 0, 0, mp.Pos * 1000)) END PUBLIC SUB MediaPlayer1_End() ToggleButton1.Value = FALSE END
|
il y a tellement longtemps que personne ne dépose plus rien sur le site et que même Gambix ne s'en préoccupe pas malgré mes relances et celles de Sphéris que je pensais ce site voué à l'extinction, alors merci encore pour ce code qui sera utile à tous ceux qui veulent s'occuper de son, de musique et de webradios.
Valaquarus.