1 | function tubepress_shadowbox_player_init(baseUrl) {
|
---|
2 | _tubepress_shadowbox_player_shadowboxjs(baseUrl + '/ui/players/shadowbox/');
|
---|
3 | }
|
---|
4 |
|
---|
5 | function _tubepress_shadowbox_player_shadowboxjs(base) {
|
---|
6 | _tubepress_get_wait_call(base + 'lib/shadowbox.js',
|
---|
7 | function() { return typeof Shadowbox != 'undefined'; },
|
---|
8 | function() { _tubepress_shadowbox_player_shadowboxlang(base); }
|
---|
9 | );
|
---|
10 | }
|
---|
11 |
|
---|
12 | function _tubepress_shadowbox_player_shadowboxlang(base) {
|
---|
13 | _tubepress_get_wait_call(base + 'lib/languages/shadowbox-en.js',
|
---|
14 | function() { return typeof Shadowbox.lang != 'undefined'; },
|
---|
15 | function() { _tubepress_shadowbox_player_shadowboxplayer(base); }
|
---|
16 | );
|
---|
17 | }
|
---|
18 |
|
---|
19 | function _tubepress_shadowbox_player_shadowboxplayer(base) {
|
---|
20 | _tubepress_get_wait_call(base + 'lib/players/shadowbox-html.js',
|
---|
21 | function() { return typeof Shadowbox.html != 'undefined'; },
|
---|
22 | function() { _tubepress_shadowbox_player_shadowboxadapter(base); }
|
---|
23 | );
|
---|
24 | }
|
---|
25 |
|
---|
26 | function _tubepress_shadowbox_player_shadowboxadapter(base) {
|
---|
27 | _tubepress_get_wait_call(base + 'lib/adapters/shadowbox-jquery.js',
|
---|
28 | function() { return typeof Shadowbox.lib != 'undefined'; },
|
---|
29 | function() { _tubepress_init_shadowbox(base); }
|
---|
30 | );
|
---|
31 | }
|
---|
32 |
|
---|
33 | function tubepress_shadowbox_player(galleryId, videoId) {
|
---|
34 | var wrapperId = "#tubepress_embedded_object_" + galleryId,
|
---|
35 | wrapper = jQuery(wrapperId),
|
---|
36 | obj = jQuery(wrapperId + " > object"),
|
---|
37 | params = obj.children("param"),
|
---|
38 | videoTitleAnchor = jQuery("#tubepress_title_" + videoId + "_" + galleryId);
|
---|
39 | Shadowbox.open({
|
---|
40 | player: 'html',
|
---|
41 | title: videoTitleAnchor.html(),
|
---|
42 | content: tubepress_deep_construct_object(wrapper, params),
|
---|
43 | height: obj.css("height"),
|
---|
44 | width: obj.css("width")
|
---|
45 | });
|
---|
46 | }
|
---|
47 |
|
---|
48 | function _tubepress_init_shadowbox(base) {
|
---|
49 | Shadowbox.path = base + 'lib/';
|
---|
50 | Shadowbox.init({
|
---|
51 | initialHeight : 160,
|
---|
52 | initialWidth: 320,
|
---|
53 | skipSetup: true,
|
---|
54 | players: ["html"],
|
---|
55 | useSizzle: false
|
---|
56 | });
|
---|
57 | Shadowbox.load();
|
---|
58 | }
|
---|
59 |
|
---|