Bonjour
J'essaie de créer un simple lecteur audio avec jPlayer avec ce code :
Quand je lance l'appli, j'ai rien à l'écran
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <!DOCTYPE HTML> <html lang="fr-FR"> <head> <meta charset="Cp1252"> <title>Document sans nom</title> <script src="http://html5media.googlecode.com/svn/trunk/src/html5media.min.js"></script> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> <script src="http://code.jquery.com/jquery-1.5.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> <script src="jquery/jquery.mobile-1.0a4.1.js"></script> <script src="jquery/jquery.mobile-1.0a4.1.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"> </script> <script type="text/javascript" src="/jPlayer/js/jquery.jplayer.min.js"> </script> </head> <script type="text/javascript"> $(document).ready(function(){ $("#jquery_jplayer").jPlayer({ // Instantiate the plugin ready: function () { // Executed when the plugin is ready this.element.jPlayer("setFile", "luce1.mp3", "luce1.ogg").jPlayer("play"); // Auto-play the audio }, oggSupport: true, customCssIds: true }); $("#jquery_jplayer").jPlayer("cssId", "play", "play_button"); // Associates play $("#jquery_jplayer").jPlayer("cssId", "pause", "pause_button"); // Associates pause $("#jquery_jplayer").jPlayer("cssId", "stop", "stop_button"); // Associates stop $("#jquery_jplayer").jPlayer("onSoundComplete", function() { // Executed when the mp3 ends this.element.jPlayer("play"); // Auto-repeat }); }); </script> <body> <div id="jquery_jplayer"> </div> <ul> <li id="play_button"> play </li> <li id="pause_button"> pause </li> <li id="stop_button"> stop </li> </ul> </body>
Pouvez-vous me guider, car je ne trouve rien sur le web
Merci pour vos réponses
Partager