aboutsummaryrefslogtreecommitdiff
path: root/js/video.js
diff options
context:
space:
mode:
authorHeshan <heshan@heidisoft.com>2011-03-07 22:37:41 +0530
committerHeshan <heshan@heidisoft.com>2011-03-07 22:37:41 +0530
commita9addd6ed7ab0e15e1d4b3db4c67ea9b00578d2d (patch)
treeb3efb6e8821cadfeace771eb1fc5e23b1925fe84 /js/video.js
parentf804c5913e46299bc52f97ce7905bc00c162db81 (diff)
downloadvideo-a9addd6ed7ab0e15e1d4b3db4c67ea9b00578d2d.tar.gz
video-a9addd6ed7ab0e15e1d4b3db4c67ea9b00578d2d.tar.bz2
Remove unwanted JS files and added manual thumbnail update on fallback and manual select.
Diffstat (limited to 'js/video.js')
-rw-r--r--js/video.js112
1 files changed, 57 insertions, 55 deletions
diff --git a/js/video.js b/js/video.js
index 0a9711a..4a23b53 100644
--- a/js/video.js
+++ b/js/video.js
@@ -4,79 +4,81 @@
* Adds some show/hide to the admin form to make the UXP easier.
*
*/
+(function($){
-$(document).ready(function() {
- //lets see if we have any jmedia movies
- if($.fn.media) {
- $('.jmedia').media();
- }
+ $(document).ready(function() {
+ //lets see if we have any jmedia movies
+ if($.fn.media) {
+ $('.jmedia').media();
+ }
- video_hide_all_options();
- $("input[name='video_convertor']").change(function() {
video_hide_all_options();
- });
+ $("input[name='video_convertor']").change(function() {
+ video_hide_all_options();
+ });
- // change metadata options
- video_hide_all__metadata_options();
- $("input[name='video_metadata']").change(function() {
+ // change metadata options
video_hide_all__metadata_options();
- });
+ $("input[name='video_metadata']").change(function() {
+ video_hide_all__metadata_options();
+ });
- // change metadata options
- video_hide_all__filesystem_options();
- $("input[name='video_filesystem']").change(function() {
+ // change metadata options
video_hide_all__filesystem_options();
- });
+ $("input[name='video_filesystem']").change(function() {
+ video_hide_all__filesystem_options();
+ });
- $('.video_select').each(function() {
- var ext = $(this).attr('rel');
- $('select', this).change(function() {
- if($(this).val() == 'video_play_flv') {
+ $('.video_select').each(function() {
+ var ext = $(this).attr('rel');
+ $('select', this).change(function() {
+ if($(this).val() == 'video_play_flv') {
+ $('#flv_player_'+ext).show();
+ } else {
+ $('#flv_player_'+ext).hide();
+ }
+ });
+ if($('select', this).val() == 'video_play_flv') {
$('#flv_player_'+ext).show();
- } else {
- $('#flv_player_'+ext).hide();
}
});
- if($('select', this).val() == 'video_play_flv') {
- $('#flv_player_'+ext).show();
- }
- });
- if(Drupal.settings.video) {
- $.fn.media.defaults.flvPlayer = Drupal.settings.video.flvplayer;
+ if(Drupal.settings.video) {
+ $.fn.media.defaults.flvPlayer = Drupal.settings.video.flvplayer;
- }
+ }
- //lets setup our colorbox videos
- $('.video-box').each(function() {
- var url = $(this).attr('href');
- var data = $(this).metadata();
- var width = data.width;
- var height= data.height;
- var player = Drupal.settings.video.player; //player can be either jwplayer or flowplayer.
- $(this).colorbox({
- html: '<a id="video-overlay" href="'+url+'" style="height:'+height+'; width:'+width+'; display: block;"></a>',
- onComplete:function() {
- if(player == 'flowplayer') {
- flowplayer("video-overlay", Drupal.settings.video.flvplayer, {
- clip: {
- autoPlay: Drupal.settings.video.autoplay,
- autoBuffering: Drupal.settings.video.autobuffer
- }
- });
- } else {
- $('#video-overlay').media({
- flashvars: {
- autostart: Drupal.settings.video.autoplay
+ //lets setup our colorbox videos
+ $('.video-box').each(function() {
+ var url = $(this).attr('href');
+ var data = $(this).metadata();
+ var width = data.width;
+ var height= data.height;
+ var player = Drupal.settings.video.player; //player can be either jwplayer or flowplayer.
+ $(this).colorbox({
+ html: '<a id="video-overlay" href="'+url+'" style="height:'+height+'; width:'+width+'; display: block;"></a>',
+ onComplete:function() {
+ if(player == 'flowplayer') {
+ flowplayer("video-overlay", Drupal.settings.video.flvplayer, {
+ clip: {
+ autoPlay: Drupal.settings.video.autoplay,
+ autoBuffering: Drupal.settings.video.autobuffer
+ }
+ });
+ } else {
+ $('#video-overlay').media({
+ flashvars: {
+ autostart: Drupal.settings.video.autoplay
},
- width:width,
- height:height
- });
+ width:width,
+ height:height
+ });
+ }
}
- }
+ });
});
});
-});
+})(jQuery);
function video_hide_all_options() {
$("input[name='video_convertor']").each(function() {