PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` extension.playlist_wnd = null; extension.playlist_filter_event = function(evt) { switch (evt.type) { case GF_JS_EVENT_PLAYLIST_ADD: this.add_playlist_item(evt.url); return true; case GF_JS_EVENT_PLAYLIST_RESET: this.reset_playlist(); return true; case GF_JS_EVENT_PLAYLIST_PLAY: this.playlist_idx = evt.index - 1; this.start(); this.playlist_next(); return true; default: return false; } } extension.create_playlist_event_filter = function (__anobj) { return function (evt) { return __anobj.playlist_filter_event(evt); } } extension.pl_event_filter = null; extension.playlist = []; var plist = extension.get_option('Playlist'); if ((plist != null) && (plist != '')) { extension.playlist = gwskin.parse(plist); } extension.playlist_idx = 0; var plistidx = extension.get_option('PlaylistIndex'); if (plistidx != null) { extension.playlist_idx = parseInt(plistidx); } extension.view_playlist = function () { if (this.playlist_wnd) { this.playlist_wnd.close(); this.playlist_wnd = null; return; } var plist = gw_new_window_full(null, true, 'Playlist'); this.playlist_wnd = plist; plist.extension = this; plist.hide_controler = false; this.controler.hide(); plist.on_close = function () { if (! this.hide_controler) this.extension.controler.show(); this.extension.playlist_wnd = null; this.extension.file_open_dlg = false; } plist.area = gw_new_grid_container(plist); plist.area.break_at_line = true; plist.area.dlg = plist; plist.go_prev = plist.add_tool('previous'); plist.go_prev.on_click = function () { this.dlg.area._move_page(-1); } plist.go_next = plist.add_tool('next'); plist.go_next.on_click = function () { this.dlg.area._move_page(1); } plist.add = plist.add_tool('add'); plist.add.on_click = function () { this.dlg.browse_files(); } plist.browse_files = function() { this.hide(); var fb = this.extension.open_local_file(); fb.playlist = this; fb.on_browse = function (value, directory) { this.playlist.show(); plist.add_files(value, false, false); if (directory) gpac.last_working_directory = directory; } fb.on_close = function () { this.playlist.show(); } fb.on_long_click = function (filename, path, directory) { var popup = gw_new_window_full(null, true, ''); popup.fb = fb; this.disable(); popup.area = gw_new_grid_container(popup); popup.area.dlg = popup; popup.area.break_at_line = true; popup.set_size(0.9 * this.width, 0.9 * this.height); popup.move(this.translation.x, this.translation.y); if (directory) { var item = gw_new_icon_button(popup.area, 'scan_directory', 'Add directory', true, 'listitem'); item.set_size(popup.width, gwskin.default_control_height); item.dlg = popup; item.on_click = function() { var filelist = gpac.enum_directory(path, '*', false); item.dlg.fb.playlist.add_files(filelist, false, false); item.dlg.fb.close(); item.dlg.close(); } item = gw_new_icon_button(popup.area, 'scan_directory', 'Insert directory', true, 'listitem'); item.set_size(popup.width, gwskin.default_control_height); item.dlg = popup; item.on_click = function() { var filelist = gpac.enum_directory(path, '*', false); item.dlg.fb.playlist.add_files(filelist, true, false); item.dlg.fb.close(); item.dlg.close(); } } else { var item = gw_new_icon_button(popup.area, 'add', 'Add file', true, 'listitem'); item.set_size(popup.width, gwskin.default_control_height); item.dlg = popup; item.on_click = function() { item.dlg.fb.playlist.add_files(path, false, false); item.dlg.fb.close(); item.dlg.close(); } item = gw_new_icon_button(popup.area, 'add', 'Insert file', true, 'listitem'); item.set_size(popup.width, gwskin.default_control_height); item.dlg = popup; item.on_click = function() { item.dlg.fb.playlist.add_files(path, true, false); item.dlg.fb.close(); item.dlg.close(); } } popup.area.layout(); popup.set_alpha(1); popup.on_close = function () { this.fb.enable(); } popup.show(); } } plist.add_object = function(pl_item, is_selected) { var icon_name = is_selected ? 'play' : gw_guess_mime_icon(pl_item.name); var item = gw_new_icon_button(this.area, icon_name, pl_item.name, true, 'listitem'); item.set_size(this.width, gwskin.default_control_height); item.dlg = this; item.pl_item = pl_item; item.on_click = function() { this.dlg.extension.playlist_play(this.pl_item); this.dlg.hide_controler = true; this.dlg.close(); } this.trash.enable(); if (plist.extension.playlist.length>1) this.sort.enable(); } plist.add_files = function(list, is_insert, recursive) { if (typeof list =='string') { var obj = {}; var names = list.split('/'); if (names.length == 0) names = list.split('\\'); obj.name = names.pop(); var len = list.length - obj.name.length; obj.path = list.slice(0, len); if (is_insert) { this.extension.playlist.splice(this.extension.playlist_idx+1, 0, obj); } else { this.extension.playlist.push(obj); this.add_object(obj, false); } } else { //temp array for sorting, we have issues sorting Arrays creating by native code var ar = []; for (var i=0; i b.name; } ); } else { ar.sort( function(a, b) { return a.name < b.name; } ); } for (var i=0; i b.name;} ); wnd._sort_type = 1; } else { wnd.extension.playlist.sort( function (a, b) { return a.name < b.name;} ); wnd._sort_type = 0; } wnd.extension.set_option('Playlist', gwskin.stringify(wnd.extension.playlist)); wnd.refresh_items(); } plist.area.on_page_changed = function () { if (this.is_first_page()) this.dlg.go_prev.disable(); else this.dlg.go_prev.enable(); if (this.is_last_page()) this.dlg.go_next.disable(); else this.dlg.go_next.enable(); } plist.trash = plist.add_tool('trash'); plist.trash.on_click = function () { this.dlg.area.reset_children(); this.dlg.extension.playlist = []; this.dlg.extension.set_option('Playlist', gwskin.stringify(this.dlg.extension.playlist)); this.dlg.extension.set_option('PlaylistIndex', '0'); this.dlg.extension.set_playlist_mode(true); this.disable(); } plist.trash.disable(); plist.sort.disable(); plist.refresh_items = function() { this.area.reset_children(); for (var i=0; i