PageSourceSearch

https://mggu-sh.ru/wp-content/themes/start/sites/all/modules/video/js/video.js

js mggu-sh.ru collected 2026-10-02 09:53:42 UTC 3,473 bytes, 132 lines download raw bytes

1
2/**
3 * @file
4 * Adds some show/hide to the admin form to make the UXP easier.
5 *
6 */
7
8$(document).ready(function() {
9  //lets see if we have any jmedia movies
10  if($.fn.media) {
11    $('.jmedia').media();
12  }
13	
14  video_hide_all_options();
15  $("input[name='vid_convertor']").change(function() {
16    video_hide_all_options();
17  });
18
19  // change metadata options
20  video_hide_all__metadata_options();
21  $("input[name='vid_metadata']").change(function() {
22    video_hide_all__metadata_options();
23  });
24
25  // change metadata options
26  video_hide_all__filesystem_options();
27  $("input[name='vid_filesystem']").change(function() {
28    video_hide_all__filesystem_options();
29  });
30
31  $('.video_select').each(function() {
32    var ext = $(this).attr('rel');
33    $('select', this).change(function() {
34      if($(this).val() == 'video_play_flv') {
35        $('#flv_player_'+ext).show();
36      } else if($(this).val() == 'video_play_html5') {
37        $('#html5_player_'+ext).show();
38      } else {
39        $('#flv_player_'+ext).hide();
40        $('#html5_player_'+ext).hide();
41      }
42    });
43    if($('select', this).val() == 'video_play_flv') {
44      $('#flv_player_'+ext).show();
45    }
46    if($('select', this).val() == 'video_play_html5') {
47      $('#html5_player_'+ext).show();
48    } else {
49      $('#html5_player_'+ext).hide();
50    }
51  });
52	
53  if(Drupal.settings.video) {
54    $.fn.media.defaults.flvPlayer = Drupal.settings.video.flvplayer;
55
56  }
57	
58  //lets setup our colorbox videos
59  $('.video-box').each(function() {
60    var url = $(this).attr('href');
61    var data = $(this).metadata();
62    var width = data.width;
63    var height= data.height;
64    var player = Drupal.settings.video.player; //player can be either jwplayer or flowplayer.
65    $(this).colorbox({
66      html: '<a id="video-overlay" href="'+url+'" style="height:'+height+'; width:'+width+'; display: block;"></a>',
67      onComplete:function() {
68        if(player == 'flowplayer') {
69          flowplayer("video-overlay", Drupal.settings.video.flvplayer, {
70            clip: {
71              autoPlay: Drupal.settings.video.autoplay,
72              autoBuffering: Drupal.settings.video.autobuffer
73            }
74          });
75        } else {
76          $('#video-overlay').media({
77            flashvars: {
78              autostart: Drupal.settings.video.autoplay
79            },
80            width:width,
81            height:height
82          });
83        }
84      }
85    });
86  });
87});
88
89function video_hide_all_options() {
90  $("input[name='vid_convertor']").each(function() {
91    var id = $(this).val();
92    $('#'+id).hide();
93    if ($(this).is(':checked')) {
94      $('#' + id).show();
95    }
96  });
97}
98
99function videoftp_thumbnail_change() {
100  // Add handlers for the video thumbnail radio buttons to update the large thumbnail onchange.
101  $(".video-thumbnails input").each(function() {
102    var path = $(this).val();
103    if($(this).is(':checked')) {
104      var holder = $(this).attr('rel');
105      $('.'+holder+' img').attr('src', Drupal.settings.basePath + path);
106    }
107  });
108
109}
110
111function video_hide_all__metadata_options() {
112  $("input[name='vid_metadata']").each(function() {
113    var id = $(this).val();
114    $('#'+id).hide();
115    if ($(this).is(':checked')) {
116      $('#' + id).show();
117    }
118  });
119}
120
121function video_hide_all__filesystem_options() {
122  $("input[name='vid_filesystem']").each(function() {
123    var id = $(this).val();
124    $('#'+id).hide();
125    if ($(this).is(':checked')) {
126      $('#' + id).show();
127    }
128  });
129}
130
131
132

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.