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
98
99
100
| PUBLIC SUB ToggleButton1_Click() 'lecture ou stop
IF ToggleButton1.Value THEN 'ToggleButton1.Value = True $TextArea1.Clear Choix()
IF NOT MenuExterne.Checked THEN $mp.SetWindow($DrawingArea1) ELSE $mp.SetWindow(NULL) ENDIF
$mp.Play ToggleButton1.Foreground = Color.Red ToggleButton1.Text = ("Pause") ToggleButton1.Picture = Picture["icon:/24/pause"] Menu9.Enabled = FALSE 'menu vision ELSE 'ToggleButton1.Value = False $mp.Pause IF $bChoix THEN ComboBox1.Enabled = TRUE ELSE ComboBox1.Enabled = FALSE Menu2.Caption = "Version : " & Application.Version ' jusqu'à changement pour fichier choisi ToggleButton1.Foreground = Color.Green ToggleButton1.Text = ("Lecture") ToggleButton1.Picture = Picture["icon:/24/play"] Menu9.Enabled = TRUE 'menu vision ENDIF
CATCH
END
PUBLIC SUB MediaPlayer1_End()
ToggleButton1.Value = FALSE
END
PUBLIC SUB MediaPlayer1_State()
$Meta.Clear $ss.Clear
END
PUBLIC SUB MediaPlayer1_Message((Source) AS MediaControl, Type AS INTEGER, Texte AS STRING)
Message.Title = ("Une erreur est survenue")
SELECT CASE Type CASE Media.Info Message.Info((Texte))
CASE Media.Warning Message.Warning((Texte))
CASE Media.Error Message.Error((Texte)) btnStop_Click() END SELECT
END
PUBLIC SUB MediaPlayer1_Tag(tagList AS MediaTagList) 'meta données
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() 'position dans le flux
DIM monTexte AS STRING
IF $bChoix THEN 'radios montexte = ComboBox1.Text $slider1.Visible = FALSE ME.Title = monTexte & " ~ " & Str(Time(0, 0, 0, $mp.Pos * 1000)) ELSE 'fichier montexte = sFichierChoix $slider1.Visible = TRUE $slider1.MinValue = 0 $slider1.MaxValue = $mp.duration $slider1.Value = $mp.pos ME.Title = monTexte & " ~ " & Str(Time(0, 0, 0, $mp.Pos * 1000)) & " / " & Str(Time(0, 0, 0, $mp.Duration * 1000)) ENDIF
END
|