Bonjour,
je n'arrive pas à faire fonctionner ce code, comme si mon javascript ne fonctionnait pas.
J'ai une premiere source qui va chercher une bibliotheque et un autre javascript qui est directement dans la feuille mais les actions ne fonctionnent pas.
Pouvez vous m'aider?
Code HTML : 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
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 <!DOCTYPE html> <html> <head> <script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script> <style> div { margin-top: 3px; padding: 0 10px; } button { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; cursor: pointer; font-weight: 700; font-size: 13px; padding: 8px 18px 10px; line-height: 1; color: #fff; background: #345; border: 0; border-radius: 4px; margin-left: 0.75em; } p { display: inline-block; margin-left: 10px; } </style> </head> <body> <iframe id="player1" src="https://player.vimeo.com/video/76979871?api=1&player_id=player1" width="630" height="354" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <div> <button>Play</button> <button>Pause</button> <p>Status: <span class="status">…</span></p> </div> <script> $(function() { var iframe = $('#player1')[0]; var player = $f(iframe); var status = $('.status'); // When the player is ready, add listeners for pause, finish, and playProgress player.addEvent('ready', function() { status.text('ready'); player.addEvent('pause', onPause); player.addEvent('finish', onFinish); player.addEvent('playProgress', onPlayProgress); }); // Call the API when a button is pressed $('button').bind('click', function() { player.api($(this).text().toLowerCase()); }); function onPause() { status.text('paused'); } function onFinish() { status.text('finished'); } function onPlayProgress(data) { status.text(data.seconds + 's played'); } }); </script> </body> </html>
Partager