equal
deleted
inserted
replaced
1 (function($) { |
1 (function($) { |
2 |
2 |
3 window.PyAMS_media = { |
3 window.PyAMS_media = { |
4 |
4 |
5 initPlayer: function(element) { |
5 initPlayer: function() { |
6 MyAMS.dialog.registerShownCallback(PyAMS_media.initPlayerDialog, element); |
6 var player = $(this); |
7 var players = $('.flowplayer', element); |
7 MyAMS.dialog.registerShownCallback(PyAMS_media.initPlayerDialog, player); |
8 if (players.exists()) { |
8 var flowplayer = player.flowplayer(); |
9 players.each(function () { |
9 var events = player.data('ams-flowplayer-events'); |
10 var player = $(this); |
10 if (events) { |
11 var flowplayer = $(player).flowplayer(); |
11 for (var event in events) { |
12 var events = player.data('ams-flowplayer-events'); |
12 flowplayer.on(event, MyAMS.getFunctionByName(events[event])); |
13 if (events) { |
13 } |
14 for (var event in events) { |
|
15 flowplayer.on(event, MyAMS.getFunctionByName(events[event])); |
|
16 } |
|
17 } |
|
18 }); |
|
19 } |
14 } |
20 }, |
15 }, |
21 |
16 |
22 initPlayerDialog: function() { |
17 initPlayerDialog: function() { |
23 var dialog = $(this); |
18 var dialog = $(this); |